-
Notifications
You must be signed in to change notification settings - Fork 334
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
Do not remove focus outline from disabled link buttons in forced colors mode #2265
Conversation
Wondering if we should also deprecate the Styling link buttons to look disabled without being able to effectively make them non-interactive and non-focusable seems like a bad idea generally. |
Written up an issue to remove the ability to style link buttons as disabled: #2271 |
@36degrees Can you add this to the changelog and tag the issue to the [NEXT] release milestone? |
SortSite flags this as a potential issue, referencing WCAG 2.0 F78 [1]: > The CSS outline or border style on this element makes it difficult or impossible to see the dotted link focus outline. Adding the `--disabled` modifier to link buttons (`<a>` elements styled as buttons) does not remove them from the tab index or make them non-interactive. From testing, they are still focusable and retain the rest of the focus state, so avoid trying to remove the outline. This change should not effect buttons, as disabled buttons are not focusable and so the focus pseudo-selector should never apply to them. [1]: https://www.w3.org/TR/WCAG20-TECHS/F78.html
bdf721c
to
d0f6f08
Compare
Have changed "Don't" in title to "Do not." We'll be linking to this PR from our next release notes and many users have difficulties with negative contractions. |
SortSite flags this as a potential issue, referencing WCAG 2.0 F78:
We apply a 3px transparent outline to focused buttons, which becomes the visible focus indicator in forced color mode when the other focus state changes to the background and box shadow are not visible.
Adding the
--disabled
modifier to link buttons (<a>
elements styled as buttons) does not remove them from the tab index or make them non-interactive. They are still focusable and outside of forced color mode retain the rest of the focus state. Removing the outline means that users in High Contrast Mode who focus the 'disabled' link button will not have a visible focus indicator.This change should not affect buttons, as disabled buttons are not focusable and so the
:focus
pseudo-selector should never apply to them.Outside of forced color mode there should be no visible change, as the outline is transparent.
Before
http://govuk-frontend-review.herokuapp.com/components/button/link-disabled/preview
After
https://govuk-frontend-pr-2265.herokuapp.com/components/button/link-disabled/preview
Fixes #2127