mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-02-19 09:54:36 -05:00
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’).
9 lines
268 B
HTML
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 %}
|