-
Notifications
You must be signed in to change notification settings - Fork 16
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
Make Expose accessible #18
base: master
Are you sure you want to change the base?
Make Expose accessible #18
Conversation
Allow upload to Authoring Tool
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.
Thanks for your contribution, it's definitely an issue that needs attending to. I think we may also need to add the ariaRegion into the top of the template as well.
I've made a few points below. Let me know if you're unsure of anything or if you're not able to make the changes and I'll pick this up myself.
Thanks again - I do really appreciate everyone that's willing to contribute!
templates/expose.hbs
Outdated
@@ -5,7 +5,7 @@ | |||
{{#each _items}} | |||
<div class="expose-item nth-child-{{@index}}"> | |||
<div class="expose-item-inner"> | |||
<button class="expose-item-button"></button> | |||
<button class="expose-item-button" title="{{#if front}} {{{a11y_text front}}} {{else}} reveal {{/if}}"></button> |
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.
- As well as making text accessible we also need to be mindful about not hard coding language strings.
- Reveal is quite vague - I would default to something like 'Expose button'
- Would an aria label be more appropriate than a title? That way the label would still be present regardless of there being a title or not.
- Language string should be placed in _globals._components._expose.buttonLabel and schema needs updating
- Code wise there shouldn't really be any spaces in between Handlebars helpers otherwise Handlebars will render these. E.g.
{{#if front}}{{{a11y_text front}}}{{else}}reveal{{/if}}
. I know reading is more difficult but the output is tidier.
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.
I can try next time I have a window of opportunity.
Adding a title to the button gives it meaning in a screenreader