department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
97 stars 69 forks source link

Plain text links in Vet Center spotlights in CMS #10301

Open laflannery opened 2 years ago

laflannery commented 2 years ago

Description

On the Vet Center content type, there is a Spotlight section (Featured content). When links are added, they are shown as naked links rather than linked text which is not an ideal experience for screen reader users.

Is it possible to update this so that the links render as they would on the FE, with the linked text instead?

Screenshot

Example: Brockton Vet Center image

Additional Info

On the VAMC System page, when the user enters similar content (a link URL and link text), these do display as correct linked text. This would be the behavior we would want here: image

Accessibility Standard

WCAG version 2.0 A, Criterion 2.4.4

Acceptance Criteria

CMS Team

Please check the team(s) that will do this work.

davidmpickett commented 10 months ago

Following up on my comment from on 16169, I think that the root place that change should be implemented is on the Display settings of the Call to Action paragraph type. The Spotlight content paragraph type is using the default View mode for CTA paragraphs.

If we wanted to scope this change to the Spotlight content paragraph type, we could create a new View Mode and use for when CTA paragraphs are embedded in Spotlights, but I think the intent here is to fix all instances

davidmpickett commented 10 months ago

Part of the underlying issue here seems to stem from a decision to separate the Link Text field from the Link field on the CTA paragraph type. The example you show of VAMC Systems is using the Link field to manage both the URL & the link text. That is why those links are able to show up as a unified link, because both halves of each link are stored in a single field.

By contrast, the Link field on the CTA paragraph type has disabled the built in link text option.

Screenshot 2023-11-27 155229

There may be a way to recombine these in the display, but honestly, the real question is why are we sometimes using the CTA paragraph type vs. the Link field, because this separation or URL and link text seems to be the main functional distinction. 🤔