-
Notifications
You must be signed in to change notification settings - Fork 77
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
feat: add accessibility features to popover control #792
Conversation
Deploy preview for fundamental-react ready! Built with commit 4d53062 |
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.
Generally the onKeyPress
works well with simple Popover controls. It gets a bit tricky with complex controls like ComboboxInput
, LocalizationEditor
, SearchInput
because they have additional input
and button
within.
src/LocalizationEditor/__snapshots__/LocalizationEditor.test.js.snap
Outdated
Show resolved
Hide resolved
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.
✅ QA looks good to me on Chrome with VoiceOver.
Description
Add accessibility features to the
Popover
control
prop. This way, any element can be passed as a control, but it will still work as a button.tabIndex
: puts normally non-tabbable elements into the normal tab flowaria-haspopup
: indicates the button triggers a popuprole="button"
: screenreader will announce element as buttononKeyPress
handler: if thecontrol
is not a button, addsenter
andspace
as a way to trigger the popover.