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

Download button has conflicting attributes #97

Open
cjrace opened this issue Dec 8, 2024 · 1 comment
Open

Download button has conflicting attributes #97

cjrace opened this issue Dec 8, 2024 · 1 comment

Comments

@cjrace
Copy link
Contributor

cjrace commented Dec 8, 2024

The ‘Download data’ link has conflicting attributes applied to it, which might be confusing for assistive technology.

Page 46 of the DAC report for more details

Currently the element found within the link has the ‘role="presentation"’ attribute applied which should programmatically hide the element from assistive technology, however due to the implementation of the ‘aria-label’ attribute this overrides the attribute, which means it is discoverable to assistive technology. As a result of this the link will have the accessible name of ‘download icon Download data’.

Also, there is an ‘aria-live’ attribute applied which should only be used to inform assistive technologies about regions of a web page that are dynamically updated and should be announced to users in a non-interruptive manner. In its current form this does not provide
screen reader users with a status message, however the inclusion of this attribute is not suitable for this scenario.

Additional instances of this issue may exist on other pages throughout the website; wherever this issue occurs, they too will need to be resolved.

Solution

Remove the ‘aria-label’ and the ‘aria-live’ attribute as they are not required. The ‘role="presentation"’ attribute will inform assistive technologies that an element should be treated as purely presentational and should not be announced to the user.
Removing the ‘aria-label’ will provide the link with an accessible name of ‘Download data’ which is expected.

@cjrace
Copy link
Contributor Author

cjrace commented Jan 9, 2025

In the development version of shinyGovstyle there is now a download_link() function that gives a standard component for downloading files, we should switch to using this - https://dfe-analytical-services.github.io/shinyGovstyle/reference/download_link.html

@oadetayo oadetayo moved this from Todo to In Progress in R Shiny supporting materials v1.0 Feb 3, 2025
@oadetayo oadetayo self-assigned this Feb 3, 2025
@oadetayo oadetayo removed their assignment Feb 11, 2025
@oadetayo oadetayo moved this from In Progress to Todo in R Shiny supporting materials v1.0 Feb 11, 2025
@alex-rogers-hub alex-rogers-hub self-assigned this Feb 17, 2025
@alex-rogers-hub alex-rogers-hub moved this from Todo to In Progress in R Shiny supporting materials v1.0 Feb 17, 2025
@alex-rogers-hub alex-rogers-hub moved this from In Progress to In Review in R Shiny supporting materials v1.0 Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Review
Development

No branches or pull requests

3 participants