Skip to content
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_metadata): generate ARIA metadata from specification #4055

Merged
merged 1 commit into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 30 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file added aria-data-1-3-draft.json
Empty file.
1 change: 1 addition & 0 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"benchmark/target/**"
],
"include": [
"packages/aria-data/*.js",
"packages/@biomejs/**",
"packages/tailwindcss-config-analyzer/**",
"benchmark/**"
Expand Down
14 changes: 0 additions & 14 deletions crates/biome_aria/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,6 @@ pub fn is_aria_property_valid(property: &str) -> bool {
AriaPropertiesEnum::from_str(property).is_ok()
}

/// It checks if an ARIA property type is valid
///
/// ## Examples
///
/// ```
/// use biome_aria::is_aria_property_type_valid;
///
/// assert!(is_aria_property_type_valid("string"));
/// assert!(!is_aria_property_type_valid("bogus"));
/// ```
pub fn is_aria_property_type_valid(property_type: &str) -> bool {
AriaPropertyTypeEnum::from_str(property_type).is_ok()
}

#[cfg(test)]
mod test {
use crate::roles::AriaRoles;
Expand Down
5 changes: 5 additions & 0 deletions crates/biome_aria_metadata/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Biome ARIA metadata

The `build.rs` script uses `aria-data.json` to generate ARIA metadata.
`aria-data.json` is a symlink to `packages/aria-data/aria-data-<version>.json`.
See the documentation of `packages/aria-data` to generate this file.
4 changes: 4 additions & 0 deletions crates/biome_aria_metadata/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,12 @@ version = "0.5.7"

[build-dependencies]
biome_string_case = { workspace = true }
prettyplease = "0.2.22"
proc-macro2 = { workspace = true, features = ["span-locations"] }
quote = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
syn = "2.0.76"

[lints]
workspace = true
1 change: 1 addition & 0 deletions crates/biome_aria_metadata/aria-data.json
Loading
Loading