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

UHF-8804: Fix card accessibility issues #1046

Merged
merged 6 commits into from
Sep 10, 2024
Merged

Conversation

Arkkimaagi
Copy link
Contributor

@Arkkimaagi Arkkimaagi commented Aug 29, 2024

UHF-8804

  • Cards that contain tags, have sections around them with identical text that causes problems to screen readers
  • Cards with external links have deprecated, wrong external link span style with aria-label that is not supported by all screen readers.

What was done

  • Tags -component was added a new attribute insideCard which, when toggled on, switches from section-element to div-element and sets role="group" on the group. This removes the aria-label duplication problem too.
  • Cards previously did not use the ExternalLink component, now they do
  • ExternalLink component now supports setting link class and rel attributes. This is used by the card template.

How to install

  • Make sure your instance is up and running on latest dev branch.
    • git pull origin dev
    • make fresh
  • Update the HDBT theme
    • composer require drupal/hdbt:dev-UHF-8804_card_accessibility
  • Run make drush-cr

How to test

  • Check any of these problematic pages or in Kieliryhmät-page in Sote Instance
    • Check that external links now no longer have span with aria-label in them
    • Check that Cards with tags no longer have section in them wrapping the tag list.
  • Check that code follows our standards

Continuous documentation

  • This feature has been documented/the documentation has been updated
  • This change doesn't require updates to the documentation

@Arkkimaagi Arkkimaagi force-pushed the UHF-8804_card_accessibility branch from a3f1130 to c425eca Compare September 9, 2024 06:41
@Arkkimaagi Arkkimaagi marked this pull request as ready for review September 9, 2024 11:23
Copy link

github-actions bot commented Sep 9, 2024

⚠️ Visual regression found! Please check if this change is wanted or accidental. You can check the output here: https://city-of-helsinki.github.io/drupal-hdbt/pull/1046/html_report/

@Arkkimaagi Arkkimaagi force-pushed the UHF-8804_card_accessibility branch from 169e5da to 7051bf8 Compare September 10, 2024 07:39
@Arkkimaagi Arkkimaagi merged commit 55aed30 into main Sep 10, 2024
2 checks passed
@Arkkimaagi Arkkimaagi deleted the UHF-8804_card_accessibility branch September 10, 2024 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants