Age warning data attribute and testing#15968
Open
frederickobrien wants to merge 2 commits into
Open
Conversation
7a97616 to
399e1b4
Compare
|
Hello 👋! When you're ready to run Chromatic, please apply the You will need to reapply the label each time you want to run Chromatic. |
b895c58 to
cf630f6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a
data-gu-nameattribute 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.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.