Skip to content

fix(modal): role attribute can be customized - #25804

Merged
liamdebeasi merged 5 commits into
mainfrom
FW-1973
Aug 23, 2022
Merged

fix(modal): role attribute can be customized#25804
liamdebeasi merged 5 commits into
mainfrom
FW-1973

Conversation

@liamdebeasi

@liamdebeasi liamdebeasi commented Aug 23, 2022

Copy link
Copy Markdown
Contributor

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):

What is the current behavior?

Issue URL: N/A

During our discussions about #23108 I realized that the role attribute could not be customized. Long term I think it would be best to move these attribute details to .modal-wrapper since that is where the actual modal content is, but that requires some broader focus trapping fixes first. As a result, I propose we move role="dialog" to the host for now and make it customizable.

Without this fix, it will not be possible to use the Custom Dialogs feature in an accessible way (for example: setting role to alertdialog)

What is the new behavior?

  • Role can now be customized

Does this introduce a breaking change?

  • Yes
  • No

Other information

@github-actions github-actions Bot added the package: core @ionic/core package label Aug 23, 2022
@liamdebeasi
liamdebeasi marked this pull request as ready for review August 23, 2022 15:09
@liamdebeasi
liamdebeasi requested a review from a team August 23, 2022 15:09
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