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

Make Expose accessible #18

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

SteveX
Copy link

@SteveX SteveX commented Feb 14, 2019

Adding a title to the button gives it meaning in a screenreader

Allow upload to Authoring Tool
Copy link
Owner

@danielstorey danielstorey left a 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!

@@ -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>
Copy link
Owner

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.

Copy link
Author

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.

@danielstorey danielstorey changed the title Steve x patch 1 Make Expose acc essible Feb 15, 2019
@danielstorey danielstorey changed the title Make Expose acc essible Make Expose accessible Feb 15, 2019
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