Merge pull request #11 from axodotdev/aria-orientation

type aria orientation
This commit is contained in:
ashley williams 2022-12-23 09:28:36 -06:00 committed by GitHub
commit f2cbaa9e07
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -46,7 +46,7 @@ pub fn global_attrs(span: Span) -> StringyMap<Ident, TokenStream> {
insert("aria_modal", "crate::types::Bool");
insert("aria_multiline", "crate::types::Bool");
insert("aria_multiselectable", "crate::types::Bool");
insert("aria_orientation", "String"); // TODO Only supports some values https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-orientation
insert("aria_orientation", "crate::types::AriaOrientation");
insert("aria_placeholder", "String");
insert("aria_pressed", "crate::types::Bool");
insert("aria_readonly", "crate::types::Bool");

View File

@ -537,3 +537,11 @@ pub enum Wrap {
#[strum(to_string = "off")]
Off,
}
#[derive(EnumString, Display, PartialEq, Eq, PartialOrd, Ord, AsRefStr, IntoStaticStr)]
pub enum AriaOrientation {
#[strum(to_string = "horizontal")]
Horizontal,
#[strum(to_string = "vertical")]
Vertical,
}