salesforce / salesforce/design-system-react

Tree: Item "expand" button must have discernible text within the icon

Open
#2,007 4 comments 0 reactions 1 assignee View on GitHub

@AnutaK is already working on this.

Since Jun 7, 2019.

accessibility tree
Dominant language
JavaScript
Stars
982
Forks
440
Avg merge
1d 21h
Merged PRs (30d)
4

Description

http://design-system-react-components.herokuapp.com/?selectedKind=SLDSTree&selectedStory=Base&full=0&addons=1&stories=1&panelRight=0&addonPanel=storybook%2Factions%2Factions-panel
(error occurs in all Trees states except Overflow Hidden and Large dataset)

Correction is necessary because assistive text is missing (even though item 1 of 4 does not appear as expandable)

HTML: <div class="slds-tree__item slds-is-selected"><button class="slds-button slds-button_icon slds-m-right_small slds-is-disabled" disabled="" tabindex="-1" type="button" aria-hidden="true"><svg aria-hidden="true" class="slds-button__icon slds-button__icon_small"><use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#chevronright"></use></svg></button><span class="slds-size_1-of-1"><span class="slds-tree__item-label slds-truncate" title="Grains">Grains</span></span></div>

Add: <span class="slds-assistive-text">Expand Grains</span> between </use> and </button>

Corrected html: <div class="slds-tree__item slds-is-selected"><button class="slds-button slds-button_icon slds-m-right_small slds-is-disabled" disabled="" tabindex="-1" type="button" aria-hidden="true"><svg aria-hidden="true" class="slds-button__icon slds-button__icon_small"><use xlink:href="/assets/icons/utility-sprite/svg/symbols.svg#chevronright"></use></svg><span class="slds-assistive-text">Expand Grains</span></button><span class="slds-size_1-of-1"><span class="slds-tree__item-label slds-truncate" title="Grains">Grains</span></span></div>

Success Criteria: component states will pass automated aXe test.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.