-
Notifications
You must be signed in to change notification settings - Fork 24
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
Set visual focus indicator on the iframe #96
Set visual focus indicator on the iframe #96
Conversation
…ement inside, set tabIndex=0 dynamically if needed and determine scrollable content
…d of setting individual css style attribute
… and use classname instead
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.
One more question: the intention is to only add these focus styles when the iframe can't otherwise be targeted with keyboard navigation - and iframes that we can navigate or scroll using the keyboard before this change will be unaffected?
Yeah, no change visually to the existing browser's frame functionality. You can still tab through and get to the interactable element inside of the frame like before and scroll (if scrollable). The condition that would have the
|
…g previous tabIndex value so the value can be reverted
Summary
Set visual focus indicator on the iframe when focus/blur style is given by consumers. This change would allow keyboard only users to see where the focus is on the page and navigate the page with a better user experience for accessibility.
Additional Details
By default, the auto resize logic is used to size the content appropriately. However, this library also has option to set
fixedWidth
andfixedHeight
which may not fully display the content in the viewport. With that as the case, scrolling is needed to see the content. For a better user experience for keyboard only users, we should have a way to display the visual focus indicator on the frame so the users know that the focus is on the frame and can start using the arrow keys to scroll the content as needed.