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

Implement Role class with various methods #1

Closed
wants to merge 2 commits into from
Closed

Implement Role class with various methods #1

wants to merge 2 commits into from

Conversation

beefancohen
Copy link

Not sure how you were envisioning this API to look, but this was an initial pass to create a Role class that has various methods on it:

  1. name()
  2. supportedAriaProps()
  3. supportsAriaProp(prop: string)

If this isn't the direction you were hoping to go, let me know we can totally discuss! I know you were envisioning an API with queries over the whole role dataset (i.e. give me all roles that support aria-foo or give me all native DOM elements that support aria-bar). This can be exposed and used under the hood for this.

Also this is my first go with flow, so let me know if I'm missing anything. There are errors outputting w.r.t. computed class properties. They don't seem to be supported, but I think this was a good way to encapsulate the data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant