Skip to content
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 ariaLabel prop to PaneButton for icon-only buttons #49529

Merged
merged 1 commit into from
Dec 15, 2022

Conversation

maddiedierker
Copy link
Contributor

A11Y-43

Since Weblab's open/close fullscreen preview button (it's actually a div with role="button") is icon-only, it needs an aria-label attribute. I added an ariaLabel prop to the PaneButton component for this use case.

Screen Shot 2022-11-13 at 11 28 45 AM

@maddiedierker maddiedierker requested a review from a team as a code owner December 14, 2022 23:08
@maddiedierker maddiedierker requested a review from a team December 14, 2022 23:09
@@ -161,6 +161,7 @@ export const PaneButton = Radium(function(props) {
className={divClassNames}
role="button"
tabIndex="0"
aria-label={props.ariaLabel}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it so annoying that React doesn't convert ariaLabel to aria-label! Sigh.

@molly-moen
Copy link
Contributor

we had the same idea, whoever merges second will have some minor merge conflicts :) my PR

@maddiedierker maddiedierker merged commit a690533 into staging Dec 15, 2022
@maddiedierker maddiedierker deleted the weblab-expand-button branch December 15, 2022 23:51
maddiedierker pushed a commit that referenced this pull request Dec 16, 2022
maddiedierker pushed a commit that referenced this pull request Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants