-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Iframe: try role=application #53364
Open
ellatrix
wants to merge
8
commits into
trunk
Choose a base branch
from
try/iframe-role-application
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+10
−2
Open
Iframe: try role=application #53364
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
e31831f
Iframe: try role=application
ellatrix 8d31694
Try removing document role from useBlockProps to avoid Windows screen…
alexstine 60f81cc
Block contextual toolbar: add role=application
ellatrix 058b9af
iFrame title adjustment.
alexstine 728e9db
Revert toolbar changes.
alexstine fb2e6a8
Merge branch 'trunk' of github.com:WordPress/gutenberg into try/ifram…
alexstine 7d23eb3
Refresh.
alexstine 8bc12de
Try using textbox role everywhere by strict comparison of group exclu…
alexstine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -158,7 +158,7 @@ export function useBlockProps( props = {}, { __unstableIsHtml } = {} ) { | |
...props, | ||
ref: mergedRefs, | ||
id: `block-${ clientId }${ htmlSuffix }`, | ||
role: 'document', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could try to change this back to group role but would need to land this first. If not, JAWS compatibility may break. |
||
role: 'group', | ||
'aria-label': blockLabel, | ||
'data-block': clientId, | ||
'data-type': name, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Eliminating this may be actual trouble for a little while until we could work through all blocks and fix any accessibility issues. The problem is, keeping this is hurting us because trying to define a generic role for all the different blocks is not a reasonable solution. For example, this role makes no sense for the paragraph block because the paragraph block is an editable field and this role tells Windows screen readers to go into a mode which is not used for editing text, but navigating the virtual buffer of the page. Removing this also fixes the bug in the navigation block and other dynamic blocks where screen reader switches modes.
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.
It looks like we're always overriding the role to document which seems like a bug. Some blocks like paragraph define role=textbox (from rich text), but useBlockProps is overriding this. Maybe we should only set role=document if no role was defined by the block?
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.
@ellatrix I don't think that is possible at this point due to my comments around the navigation block. I think this should likely be managed block by block until we can find a suitable role that could work for any type of content. The document role causes Windows screen readers to switch modes and then the keyboard events no longer work in React so it would be good to avoid this pattern. I think it used the group role before this change and it needed to be modified for a bug in JAWS, another Windows screen reader.
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.
If you're sure about removing role=document from all blocks, I'll update the e2e tests. There's lots of tests depending on this in their selectors.
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.
Let's wait on a good accessibility review from more people than just me before you commit to that. I will try to wrangle some testing here.