Skip to content

Commit c85a549

Browse files
Add menu subheading assistive text to menu items (#3179)
* initial commit for accessible headers * Update item.jsx * adding groupedBy prop * package changes reverted
1 parent c75d7df commit c85a549

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

components/utilities/menu-list/item.jsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,9 @@ class ListItem extends React.Component {
192192
role={this.props.checkmark ? 'menuitemcheckbox' : 'menuitem'}
193193
tabIndex="-1"
194194
>
195+
{this.props.groupedBy && (
196+
<span className="slds-assistive-text">{`-${this.props.groupedBy}`}</span>
197+
)}
195198
{this.getLabel()}
196199
{this.getIcon('right')}
197200
</a>

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2032,4 +2032,4 @@
20322032
"description": "The following components are prototypes. (a) Props may change within a minor release. (b) Web Content Accessibility Guidelines may not be met. (c) CSS imports may be required, since it is being added to SLDS."
20332033
}
20342034
}
2035-
}
2035+
}

0 commit comments

Comments
 (0)