az-digital / az_quickstart

UArizona's web content management system built with Drupal 10.
https://quickstart.arizona.edu
GNU General Public License v2.0
30 stars 20 forks source link

Closes #3396: Makes clickable cards more accessible #3463

Closed danahertzberg closed 1 week ago

danahertzberg commented 1 month ago

Description

This adds help text to card link title field to encourage best accessibility practices.

Formatting changes came through automatically. I'm not getting the link URL to render on the title <a> tag and could use some help there, please.

Related issues

Closes #3396

Follow up: https://github.com/az-digital/az_quickstart/issues/3504

How to test

  1. Add cards to a flexible page
  2. Ensure if card has a link and title fields completed, the card title should be linked as well
  3. Ensure all formatting remains unchanged (excluding underline on card title hover)
  4. Test non/clickable and title location settings

Probo build: https://57b6254c-c439-411f-b907-7c043d332c1e.probo.build/pages/card-decks

Types of changes

Arizona Quickstart (install profile, custom modules, custom theme)

Drupal core

Drupal contrib projects

Checklist

danahertzberg commented 2 weeks ago

Just received approval from @accesswatch in the DRC! 🙌

danahertzberg commented 1 week ago

I am wondering though if titles should get default underlines to visually indicate that they're links. For example, in this test, you wouldn't be able to guess that the Test 1 text is clickable and Test 2 text isn't. It's also unclear that Test 3 is a whole clickable card.

Thanks @joshuasosa! I think these are great considerations. The clickable cards do get a shadow to make them (barely) visually different from non-clickable cards.

On non-clickable cards, if there is a link then the title does get an underline on hover. I'd love to learn more about what's needed from the visual standpoint. In this case, should we follow the two distinguishers rule like text links? A follow up ticket would be lovely. :)

accesswatch commented 1 week ago

I think they should as do other link text, right?

danahertzberg commented 1 week ago

Heading links follow up issue: https://github.com/az-digital/az_quickstart/issues/3504