type aria orientation

This commit is contained in:
Sara Vieira 2022-12-22 17:35:41 +00:00
parent 19af976dcb
commit a2fd84ab5e
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,
}