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

Did some work on accesibility #298

Merged
merged 5 commits into from
Aug 26, 2022
Merged

Did some work on accesibility #298

merged 5 commits into from
Aug 26, 2022

Conversation

alextreme
Copy link
Member

No description provided.

@@ -3,7 +3,9 @@


{% block header_image %}
<aside aria-label="{% trans "Header afbeelding" %}">
<img class="main-image" src="{{ hero_image_login }}" alt="Header image">
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add a proper alt label which describes the contents of the image?

@@ -1,6 +1,6 @@
{% load i18n icon_tags button_tags %}

<aside class="anchor-menu {% if desktop %}anchor-menu--desktop{% else %}anchor-menu--mobile{% endif %}">
<aside class="anchor-menu {% if desktop %}anchor-menu--desktop{% else %}anchor-menu--mobile{% endif %}" aria-label="{% trans "Zijmenu mobiel" %}">
Copy link
Contributor

Choose a reason for hiding this comment

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

I think setting a nav tag for this implicitly sets a navigation role, If a label is used, the position is not relevant for the assistive technology so a label can better describe the menu's contents like "primary navigation"?

Copy link
Contributor

Choose a reason for hiding this comment

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

User agents, such as screen readers targeting disabled users, can use this element to determine whether to omit the initial rendering of navigation-only content.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/nav

Copy link
Member Author

Choose a reason for hiding this comment

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

renamed to "Secundaire navigatie", kept as is with aria-label

@@ -11,4 +12,5 @@
{% if choice.0 in data or checked %}checked="checked"{% endif %}
/>
<label class="radio__label" for="id_{{ name }}_{{ index }}">{{ choice.1 }}</label>
Copy link
Contributor

Choose a reason for hiding this comment

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

I think nesting labels may confuse assistive technology, can we get rid of the inner label?

@@ -3,7 +3,9 @@


{% block header_image %}
<aside aria-label="{% trans "Header afbeelding" %}">
<img class="main-image" src="{{ hero_image_login }}" alt="Header image">
Copy link
Contributor

Choose a reason for hiding this comment

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

Can add a proper alt text here describing the content of the image?

The alt attribute holds a text description of the image, which isn't mandatory but is incredibly useful for accessibility — screen readers read this description out to their users so they know what the image means. Alt text is also displayed on the page if the image can't be loaded for some reason: for example, network errors, content blocking, or linkrot.

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/img

@alextreme
Copy link
Member Author

Will be bypassing the other comments and proper review, sorry! Wanted to get the changes on test and staging to ensure our auditor doesn't flag accessibility issues we've already resolved.

@alextreme alextreme merged commit 5b0d1b0 into develop Aug 26, 2022
@alextreme alextreme deleted the feature/accessibility branch August 26, 2022 19:20
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.

3 participants