Skip to content

[aria-*] [role]: implement validation, completions, and add descriptions #103

@kristoff-it

Description

@kristoff-it

Currently support for aria-* attributes is stubbed by detecting the prefix and ignoring the attribute otherwise.
This is a temporary hack to avoid blocking users while we add support for these attributes.

Solving this issue means editing src/html/Attribute.zig (see the global definition):

  • Filling out the implementation of role (it's currently stubbed as a .not_empty attribute)
  • Implementing all aria-* attributes (add them at the bottom of the list in global).
  • (once all of the above is implemented), remove the hack in Attribute.zig fn isData to only use proper global attribute definitions to recognize aria attributes

PRs that implement a subset of these elements are welcome as that's incremental progress towards completing this issue.

The authoritative spec for ARIA in HTML is https://www.w3.org/TR/html-aria/ but you are welcome to use MDN to copy definitions and in general make your job easier. Note that when in disagreement you should generally consider the spec to be the source of truth, otherwise feel free to leave a comment here to discuss how to proceed.

MDN: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Reference
The ARIA (not just in HTML) spec: https://www.w3.org/TR/wai-aria-1.3/#aria-attributes

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions