-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Add role=application to list view to prevent browse mode triggering in NVDA #44291
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
5ded249
Add role=application to list view to prevent browse mode triggering i…
talldan 200953e
Move the aria-label to application role.
alexstine e64ffb9
Add aria-label back to table for now. This broke too many E2E and thi…
alexstine 5932be5
Update snapshots
talldan 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
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
38 changes: 21 additions & 17 deletions
38
packages/components/src/tree-grid/test/__snapshots__/cell.js.snap
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 |
---|---|---|
@@ -1,23 +1,27 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`TreeGridCell uses a child render function to render children 1`] = ` | ||
<table | ||
onKeyDown={[Function]} | ||
role="treegrid" | ||
<div | ||
role="application" | ||
> | ||
<tbody> | ||
<tr> | ||
<td | ||
role="gridcell" | ||
> | ||
<button | ||
className="my-button" | ||
onFocus={[Function]} | ||
<table | ||
onKeyDown={[Function]} | ||
role="treegrid" | ||
> | ||
<tbody> | ||
<tr> | ||
<td | ||
role="gridcell" | ||
> | ||
Click Me! | ||
</button> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<button | ||
className="my-button" | ||
onFocus={[Function]} | ||
> | ||
Click Me! | ||
</button> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
`; |
2 changes: 1 addition & 1 deletion
2
packages/components/src/tree-grid/test/__snapshots__/index.js.snap
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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`TreeGrid simple rendering renders a table, tbody and any child elements 1`] = `"<table role=\\"treegrid\\"><tbody><tr role=\\"row\\" aria-level=\\"1\\" aria-posinset=\\"1\\" aria-setsize=\\"1\\"><td role=\\"gridcell\\">Test</td></tr></tbody></table>"`; | ||
exports[`TreeGrid simple rendering renders a table, tbody and any child elements 1`] = `"<div role=\\"application\\"><table role=\\"treegrid\\"><tbody><tr role=\\"row\\" aria-level=\\"1\\" aria-posinset=\\"1\\" aria-setsize=\\"1\\"><td role=\\"gridcell\\">Test</td></tr></tbody></table></div>"`; |
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.
Having the label passed in to the application role is much nicer because it gives the application a label that is also discoverable via browse mode navigation.
@MarcoZehe Am I going to get in trouble with the ARIA spec by removing the aria-label from the treegrid role? Seems like in this situation since we've got a dedicated application here, it should be fine.