patternfly-elements
patternfly-elements copied to clipboard
[fix] pfe-modal accessibility
- The focus does not stay inside the modal
- The focus skips the close button
@starryeyez024 - Which version of Firefox are you using? I'm not seeing this issue in Firefox 68.
@starryeyez024 and @kylebuch8, I also don't experience the issues stated here. However, this brings up a couple other issues.
- The
aria-labelledby
attribute on the dialog isn't receiving the ID of the heading properly (it's "undefined"). - The
tabindex
of the dialog/modal should be-1
instead of0
. This allows for programmatic focus only, and removes the "wrapper" from the normal tab order. PF4 does this much like the majority of the recommended patterns. - We should consider/discuss the possibility of allowing the tab focus to travel to the address bar as a future improvement. This hasn't been widely accepted yet (at least to my knowledge), but I've seen a few recommendations here, and I'd like to test this idea at some point.
Hmm, its FF 65 Quantum, maybe that's why. I updated the title of this issue to simply modal + accessibility so we can address the issues @markcaron brought up.
- [x] The aria-labelledby attribute on the dialog isn't receiving the ID of the heading properly (it's "undefined").
- [ ] The tabindex of the dialog/modal should be -1 instead of 0. This allows for programmatic focus only, and removes the "wrapper" from the normal tab order. PF4 does this much like the majority of the recommended patterns. (PR #1735)
We should consider/discuss the possibility of allowing the tab focus to travel to the address bar as a future improvement. This hasn't been widely accepted yet (at least to my knowledge), but I've seen a few recommendations here, and I'd like to test this idea at some point.
Are there any actionable items we can address now or does this require a new issue and further discussion?
I think this is solved in pfe 2.0 but would appreciate some more 👀 on it:
https://patternflyelements.org/components/modal/demo/