Financial-Times / x-dash

:x::heavy_minus_sign::newspaper: shared front-end components for FT.com and the FT Apps
https://financial-times.github.io/x-dash
38 stars 6 forks source link

CON-2077, CON-2078: Adds alt text to image of video teaser #695

Closed camillecroci closed 1 year ago

camillecroci commented 1 year ago

Tell me why ?

Originally it was to solve one or two DAC issues (here and there where the people using tabs and screen reader did not have enough info about what was about to happen when they clicked on the video. We needed to let them know what video it was, and to use the text that was on the image of the video. Well. Except that another PR removed the ability to tab through the videos for another reason. But for consistency purposes with this PR, we are still adding the alt text to those images on top of videos.

You said what ?

We are getting some alt text as a new property of the image of a video. We are adding that text.

You want to test me ?

I think this should work.
Open your x-dash with cc/update-teaser-DAC-non-descriptive-image-link-02 branch. make build.
Go to components/x-teaser and npm link.
Open next-video-page and npm link @financial-times/x-teaser. npm run build and yadiyadiya.
Run next-video-page and check that the video alt text is the same as the one on top of the image of the video (in video carousels). If it's not: