Files
notifications-admin/app/templates/components/api-key.html
Chris Hill-Scott ffab83729c Make screen reader announce when API key is copied
Currently screen reader users would click the ‘Copy API key’ button but
not get any feedback. This commit adds an ARIA attribute which tells the
screenreader to announce any changes in to the content of the element
(eg when it changes from showing the API to showing the text ‘API key
copied to clipboard’).
2017-02-14 11:50:12 +00:00

9 lines
268 B
HTML

{% macro api_key(key, name, thing="API key") %}
<h2 class="api-key-name">
{{ name }}
</h2>
<div data-module="api-key" data-key="{{ key }}" data-thing="{{ thing }}" aria-live="assertive">
<span class="api-key-key">{{ key }}</span>
</div>
{% endmacro %}