-
-
Notifications
You must be signed in to change notification settings - Fork 495
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor(aria): move properties to aria-metdata #4481
Conversation
let default_value = data | ||
.values | ||
.iter() | ||
.find(|(_, data)| data.is_default) | ||
.map(|(name, _)| name); | ||
let other_values = data | ||
.values | ||
.iter() | ||
.filter(|(_, data)| !data.is_default) | ||
.map(|(name, _)| name); | ||
let values = default_value.into_iter().chain(other_values); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part is responsible for the reordering of values in the snapshots.
ea077f7
to
383a0cd
Compare
We should write somewhere instructions on how to update these data. I know we have a scraper, did we write somewhere how to use it? |
CodSpeed Performance ReportMerging #4481 will not alter performanceComparing Summary
|
I previously introduced |
I think it's enough. Thank you! |
Summary
Part of #4241.
This PR moves aria properties from
biome-aria
tobiome-aria-metadata
.I renamed
AriaPropertiesEnum
toAriaAttribute
because aria properties includes both aria properties and aria states.This is also the name used by MDN.
I also renamed
AriaPropertyType
toAriaValueType
and added the tokens directly in theToken
andTokenList
variants.I didn't see the utility of declaring a service for retrieving the Aria attributes. So, I removed the service.
This allows to use the
Ast
query instead of theAria
query in some rules.Once #4241 completed, we will certainly get rid of the
Aria
query.Also, we should certainly merge the
biome-aria
andbiome-aria-metadata
crates.Test Plan
O updated the snapshots.
The only side effect of the change is some reordering of tokens: I placed the default token first.