Skip to content

Commit

Permalink
Added aria-live to message geolocate button
Browse files Browse the repository at this point in the history
This attribute will allow users using assistive devices to know the current status of the button. Whenever there message inside the button gets updated it will be read by the assistive devices, especially useful when facing a error messages, currently assistive device users weren't being aware of any errors with the geolocate button.
  • Loading branch information
lucascumsille authored and dracos committed Oct 1, 2024
1 parent dd479b3 commit 7fbad14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion templates/web/base/around/_postcode_form_geolocation.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<a href="[% url | html %]" id="geolocate_link">[% INCLUDE 'around/geolocate_link_icon.html' %]
<a href="[% url | html %]" id="geolocate_link" aria-live="polite">[% INCLUDE 'around/geolocate_link_icon.html' %]
[% loc('Use my current location') %]</a>
4 changes: 2 additions & 2 deletions templates/web/base/around/geolocate_link_icon.html
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<svg class="geolocate-link__icon" width="16" height="16" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M23.744.255a.874.874 0 01.18.974l-9.89 22.252a.874.874 0 01-1.603-.012l-3.568-8.332-8.334-3.57a.874.874 0 01-.01-1.602L22.77.075a.874.874 0 01.972.18h.002z" fill="currentColor" fill-rule="nonzero"/></svg>
<svg class="geolocate-link__loading" width="16" height="16" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><g fill="currentColor" fill-rule="nonzero"><path d="M16 8a8 8 0 11-8-8v2a6 6 0 106 6z"></path><circle cx="8" cy="1" r="1"></circle><circle cx="15" cy="8" r="1"></circle></g></svg>
<svg class="geolocate-link__icon" width="16" height="16" viewBox="0 0 24 24" role="img" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><path d="M23.744.255a.874.874 0 01.18.974l-9.89 22.252a.874.874 0 01-1.603-.012l-3.568-8.332-8.334-3.57a.874.874 0 01-.01-1.602L22.77.075a.874.874 0 01.972.18h.002z" fill="currentColor" fill-rule="nonzero"/></svg>
<svg class="geolocate-link__loading" width="16" height="16" viewBox="0 0 16 16" role="img" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"><g fill="currentColor" fill-rule="nonzero"><path d="M16 8a8 8 0 11-8-8v2a6 6 0 106 6z"></path><circle cx="8" cy="1" r="1"></circle><circle cx="15" cy="8" r="1"></circle></g></svg>

0 comments on commit 7fbad14

Please sign in to comment.