mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-11 09:28:27 -04:00
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’).
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
<h2 class="api-key-name">
|
||||
{{ name }}
|
||||
</h2>
|
||||
<div data-module="api-key" data-key="{{ key }}" data-thing="{{ thing }}">
|
||||
<div data-module="api-key" data-key="{{ key }}" data-thing="{{ thing }}" aria-live="assertive">
|
||||
<span class="api-key-key">{{ key }}</span>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
Reference in New Issue
Block a user