Skip to content

Age warning data attribute and testing#15968

Open
frederickobrien wants to merge 2 commits into
mainfrom
age-warning-data-attribute-and-test
Open

Age warning data attribute and testing#15968
frederickobrien wants to merge 2 commits into
mainfrom
age-warning-data-attribute-and-test

Conversation

@frederickobrien
Copy link
Copy Markdown
Contributor

@frederickobrien frederickobrien commented May 26, 2026

This adds a data-gu-name attribute to article age warnings to allow for interactive devs to explicitly target and style it. At the moment opaque nested CSS is required, which isn't ideal.

image

I've also added a test to ensure that attribute stays on the element, with a view of adding more for other elements. I think testing would go a long way towards formalising the contract with interactive devs on what they can count on being targetable in the DOM. There are a bunch of attributes that interactive devs depend on but their presence is not currently protected or tested for.

@frederickobrien frederickobrien added the feature Departmental tracking: work on a new feature label May 26, 2026
@frederickobrien frederickobrien self-assigned this May 26, 2026
@frederickobrien frederickobrien added this to the Interactives milestone May 26, 2026
@frederickobrien frederickobrien force-pushed the age-warning-data-attribute-and-test branch from 7a97616 to 399e1b4 Compare May 26, 2026 09:55
@frederickobrien frederickobrien marked this pull request as ready for review May 27, 2026 07:46
@github-actions
Copy link
Copy Markdown

Hello 👋! When you're ready to run Chromatic, please apply the run_chromatic label to this PR.

You will need to reapply the label each time you want to run Chromatic.

Click here to see the Chromatic project.

@frederickobrien frederickobrien force-pushed the age-warning-data-attribute-and-test branch from b895c58 to cf630f6 Compare May 27, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Departmental tracking: work on a new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant