DetailsList: select all button should not have aria-describedby if no label is present#6682
Merged
natalieethell merged 5 commits intoOct 12, 2018
Merged
Conversation
dzearing
approved these changes
Oct 12, 2018
| .first() | ||
| .getDOMNode() | ||
| .getAttribute('aria-describedby') | ||
| ).toBeNull(); |
Member
There was a problem hiding this comment.
This is totally fine, but you can also do:
expect(
component
.find(`#${selectAllCheckBoxAriaLabelledBy}`)
.first()
.getDOMNode()
.hasAttribute('aria-describedby')
).toBe(false);
Contributor
|
🎉 Handy Links: |
Contributor
Author
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Pull request checklist
$ npm run changeDescription of changes
The
aria-describedbyattribute of the select all button in DetailsList should only be set to{this._id}-checkTooltipif the label with that id exists. I added the same conditional used for adding the label with id{this._id}-checkTooltipto addingaria-describedbywith id{this._id}-checkTooltip.These changes also add aria labels to select all checkboxes in all DetailsList examples.
Focus areas to test
Added two tests in DetailsHeader.test.tsx to verify the following two scenarios:
aria-describedbydoes not exist on the select all button when anariaLabelForSelectAllCheckboxprop is not passed in.aria-describedbyexists on the select all button when anariaLabelForSelectAllCheckboxprop is passed in and anonRenderColumnHeaderTooltipis not passed in.Microsoft Reviewers: Open in CodeFlow