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

Accessibility Update #48

Closed
wants to merge 1 commit into from
Closed

Conversation

7agabond
Copy link

@7agabond 7agabond commented Nov 6, 2023

Made a small update to the code: Changed outline: none to outline-color: transparent. It's good to always have this in outlines for inputs and buttons and such, since users with higher contrasts and such could have issues using the tab button selector. This could have an unintentional effect of making special animations and attributes of the button disappear. Reference: https://www.youtube.com/shorts/4B_4WLpbyp8

Made a small update to the code: Changed outline: none to outline-color: transparent. It's good to always have this in outlines for inputs and buttons and such, since users with higher contrasts and such could have issues using the tab button selector. This could have an unintentional effect of making special animations and attributes of the button disappear. Reference: https://www.youtube.com/shorts/4B_4WLpbyp8
@7agabond 7agabond requested a review from ahosgood as a code owner November 6, 2023 17:34
@ahosgood
Copy link
Member

ahosgood commented Nov 8, 2023

Hi @7agabond - thank you for your contribution.

In this example, the class tna-!--no-focus-style is designed as an override class. In some instances, it is advantageous to not show a focus style on a focused element.

For example, when we click on a skip link to jump to an anchor on the page we want to focus on that element. However this element is not interactive and does not necessarily have to be accessible through keyboard navigation as it is just an area of the page.

In this instance, we don't want to show a focus style because the element is not focusable.

This example is used here: https://github.com/nationalarchives/tna-frontend/blob/main/src/nationalarchives/components/skip-link/skip-link.mjs#L23

We have followed the conventions of GOV.UK (skip link thread: alphagov/govuk-design-system-backlog#66) which has resulted in a similar solution: https://github.com/alphagov/govuk-frontend/blob/50e6bd4168019a79dcaf4add3f10a57c4c97156d/packages/govuk-frontend/src/govuk/components/skip-link/_index.scss#L35-L46

@ahosgood ahosgood closed this Nov 8, 2023
@ahosgood ahosgood mentioned this pull request Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants