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

ActionList: a11y fixes #1958

Merged
merged 5 commits into from
Mar 15, 2022
Merged

ActionList: a11y fixes #1958

merged 5 commits into from
Mar 15, 2022

Conversation

siddharthkp
Copy link
Member

@siddharthkp siddharthkp commented Mar 14, 2022

  1. Group container should not have role=none when there is no role on the List.

  2. Added example for Links with Heading

  3. High contrast mode:

    Copying what we do in primer/css:

    Before:

    hc-before.mov

    After: (the color is chosen by the browser)

    hc-after.mov

@siddharthkp siddharthkp self-assigned this Mar 14, 2022
@changeset-bot
Copy link

changeset-bot bot commented Mar 14, 2022

🦋 Changeset detected

Latest commit: 09e0bf9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions
Copy link
Contributor

github-actions bot commented Mar 14, 2022

size-limit report 📦

Path Size
dist/browser.esm.js 63.23 KB (+0.06% 🔺)
dist/browser.umd.js 63.59 KB (+0.06% 🔺)

Comment on lines +5 to +6
ActionList: Add focus styles for Windows high contrast mode
ActionList: Fix incorrect role for ActionList.Group outside ActionMenu
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI you can add multiple changesets in one PR

':focus': {
// we set color to be transparent and let the high contrast rules
// decide what color with contrast should that be corrected to
outline: 'solid 1px transparent !important'
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there documentation about this browser behavior anywhere?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Also what happens with safari with this media tag?

Copy link
Member Author

@siddharthkp siddharthkp Mar 15, 2022

Choose a reason for hiding this comment

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

Is there documentation about this browser behavior anywhere?

Yep! Here's the color adjustment spec and windows blog post with transparent tip. I got this trick from primer/css action-list-item.scss

Also what happens with safari with this media tag?

Safari doesn't support it, so it skips it. (Not sure if there's a way to make this work with windows high contrast + safari)

@siddharthkp siddharthkp enabled auto-merge (squash) March 15, 2022 17:07
@siddharthkp siddharthkp merged commit be8f901 into main Mar 15, 2022
@siddharthkp siddharthkp deleted the siddharth/actionlist-a11y branch March 15, 2022 17:14
@primer-css primer-css mentioned this pull request Mar 15, 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