Skip to content

fix(action-sheet): add aria-labelledby#25837

Merged
averyjohnston merged 4 commits intomainfrom
FW-1898
Aug 29, 2022
Merged

fix(action-sheet): add aria-labelledby#25837
averyjohnston merged 4 commits intomainfrom
FW-1898

Conversation

@averyjohnston
Copy link
Contributor

@averyjohnston averyjohnston commented Aug 26, 2022

Pull request checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been reviewed and added / updated if needed (for bug fixes / features)
    • Some docs updates need to be made in the ionic-docs repo, in a separate PR. See the contributing guide for details.
  • Build (npm run build) was run locally and any changes were pushed
  • Lint (npm run lint) has passed locally and any fixes were made for failures

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe): Accessibility fixes

What is the current behavior?

ion-action-sheet does not have an aria-label or aria-labelledby attribute, which his required for the dialog role.

Issue URL: N/A (internal ticket)

What is the new behavior?

  • If the header property is defined, aria-labelledby is set to point to that element.
    • Note that a fallback to subHeader is not included, because if header isn't defined, the subHeader doesn't render either way due to it being wrapped in the header element.
  • Duplicate role="dialog" removed, since it was causing an Axe violation due to nested dialogs.

Does this introduce a breaking change?

  • Yes
  • No

Other information

A separate PR will be made to document accessibility best practices with this change in mind.

@github-actions github-actions bot added the package: core @ionic/core package label Aug 26, 2022
@averyjohnston averyjohnston marked this pull request as ready for review August 26, 2022 19:49
@averyjohnston averyjohnston requested a review from a team August 26, 2022 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

package: core @ionic/core package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants