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 aria-haspopup to CircularOptionPicker component #25564

Merged
merged 2 commits into from
Sep 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ exports[`ColorPaletteControl matches the snapshot 1`] = `
>
<button
aria-expanded={false}
aria-haspopup="true"
aria-label="Custom color picker"
className="components-button is-link"
onClick={[Function]}
Expand Down
1 change: 1 addition & 0 deletions packages/components/src/circular-option-picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ function DropdownLinkAction( {
renderToggle={ ( { isOpen, onToggle } ) => (
<Button
aria-expanded={ isOpen }
aria-haspopup="true"
Copy link
Member Author

Choose a reason for hiding this comment

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

I've chosen true as value instead of a more concrete one because 1) it's still valid as of ARIA 1.1 and 2) all the cases in which aria-haspopup is present we used this value so far. Happy to set it to a different value.

onClick={ onToggle }
isLink
{ ...buttonProps }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ exports[`ColorPalette Dropdown .renderContent should render dropdown content 1`]
exports[`ColorPalette Dropdown .renderToggle should render dropdown content 1`] = `
<button
aria-expanded={true}
aria-haspopup="true"
aria-label="Custom color picker"
className="components-button is-link"
onClick={[MockFunction]}
Expand All @@ -110,12 +111,14 @@ exports[`ColorPalette Dropdown should render it correctly 1`] = `
>
<ForwardRef(Button)
aria-expanded={false}
aria-haspopup="true"
aria-label="Custom color picker"
isLink={true}
onClick={[Function]}
>
<button
aria-expanded={false}
aria-haspopup="true"
aria-label="Custom color picker"
className="components-button is-link"
onClick={[Function]}
Expand Down Expand Up @@ -538,12 +541,14 @@ exports[`ColorPalette should render a dynamic toolbar of colors 1`] = `
>
<ForwardRef(Button)
aria-expanded={false}
aria-haspopup="true"
aria-label="Custom color picker"
isLink={true}
onClick={[Function]}
>
<button
aria-expanded={false}
aria-haspopup="true"
aria-label="Custom color picker"
className="components-button is-link"
onClick={[Function]}
Expand Down