Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG][EuiModal] Fix VoiceOver + Safari escaping focus trap #7564
[BUG][EuiModal] Fix VoiceOver + Safari escaping focus trap #7564
Changes from 3 commits
a76a501
315f1dc
2afd81c
1fe835b
fcee44e
52622ce
3223244
efaad76
525b314
10d59cd
9e9cffa
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added this b/c there are a handful of cases where I'd like the modal to break user flow and announce itself immediately. Thinking specifically about modals that confirm deleting or removing an object here. By adding it as a new prop and setting a standard default, I thought we could capture the best of both worlds without accidentally regressing the container to a
div[role="presentation"]
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, is there a specific reason this needs to be named
ariaRole
or can we just go withrole
to match the DOM attribute?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, bonus/optional question: is there ever a situation where consumers would need to unset the
role
or set a non dialog role? I'm leaning towards no, but just wanted to at least raise the question and get people's thoughtsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we should go ahead and add this prop to
EuiConfirmModal
as well with a default ofalertdialogue
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No specific reason to name it
ariaRole
. I was thinkingrole
at first but talked myself out of it. I like your point thatrole
is the HTML attribute name, and changing to that feels fitting.I also like the suggestion to make
EuiConfirmModal
default toalertdialog
. I'll update and retest those.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I went ahead and added
aria-label
attributes to each example in docs. The axe-core plugin was emphasizing elements withrole="dialog | alertdialog"
should have accessible labels. Ideally we enforce having anEuiModalHeader
and title in each modal, but that's increasing scope more than the original PR set out to do.