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 improvement for the add question button #6164

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

koenvangeert
Copy link

[Issue]
There is button "Add Question" available on main content without appropriate role information.

[User Impact]
Screen reader users will be unable to determine that this content is interactive.

[Code Reference]

<div class="svc-page__add-new-question svc-btn" tabindex="0">
<span class="svc-text svc-text--normal svc-text--bold">Add Question</span>
(...)
</div>

[Recommendation]
Ensure custom controls provide proper textual name, role, and state information.

The best way to do this is to use native controls, as they come with this information built in. In this case, elements would be most appropriate.

If conversion to native buttons is not possible, developers must add role="button" to these controls. If the buttons have insufficient internal text, developers must add an aria-label attribute or an aria-labelledby attribute to provide a name.

Additionally, the developer should take the button of more option on Add Question outside the

of Add Question, remove tabindex="0" from the
& modify the CSS properties.

[Compliant Code Example]

<div class="svc-page__add-new-question svc-btn">
<button class="svc-text svc-text--normal svc-text--bold">Add Question</button>
(...)
</div>

@koenvangeert koenvangeert force-pushed the koenvg/add-question-accessibility branch from 4ad218a to 70c85e4 Compare December 4, 2024 07:38
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.

1 participant