-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Use ARIA attributes for states #1006
Conversation
This pull request is being automatically deployed with ZEIT Now (learn more). 🔍 Inspect: https://zeit.co/primer/primer-css/5dctfligo |
Applies .selected styles to [aria-selected=true]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feels good to support more aria-selected and aria-current 👍
This PR:
[aria-selected=true]
Applies .selected styles to [aria-selected=true] #982[aria-current=page]
<button>
elements for theUnderlineNav
f63d53caria
attributes instead of the.selected
and.current
classes.A typical change looks like this:
So it's still possible to use the
.selected
class for now, but not encouraged anymore.And by only using
[aria-current]
as selector, it allows the value to also betrue
, like inaria-current="true"
in case it's not a "page" and used for changing tabs without navigating to a new URL.Closes #790