html_generator::utils

Function is_valid_aria_role

Source
pub fn is_valid_aria_role(role: &str, element: &ElementRef<'_>) -> bool
Expand description

Check if an ARIA role is valid for a given element.

§Arguments

  • role - The ARIA role to validate.
  • element - The HTML element to validate.

§Returns

  • bool - Whether the role is valid for the element.