-
Notifications
You must be signed in to change notification settings - Fork 127
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
Diagram in 5.3 need fixing or removing #1222
Comments
Thank you for raising this! If you can't follow the Slack link, what was said was:
|
@michael-n-cooper I know we have talked about this before - but what would it take to make this diagram accurate? |
@sinabahram @michael-n-cooper I'd be happy to help, too. |
RE tooling, here are some options for us to consider to generate the updated version of this diagram. GraphViz, you can turn textual descriptions into complex graphs: Here's a web-based version of GraphViz: Here's another tool that even works in Markdown, called MerMaid: There's more out there, but maybe that gets us started? GraphViz has been around forever and a day. I was using it or it's predecessor 15 years ago. I remember it being super-powerful. |
+1 for mermaid |
@michael-n-cooper the linked resource needs a note that it has some errors as it has not been updated for the changes in 1.2. |
Diagram note added. Leaving open for 1.3 to update the diagram |
I was working with D3 the other day and got to think about this issue. Would the following rough example be a step in the right direction? This is a basic D3 dendogram generated by traversing role subclasses. It's obviously much simpler than the previous diagram - it lacks attributes and roles with multiple superclasses are duplicated. But I didn't want to spend too much time on it at this stage. It's easy to generate some graphviz or mermaid input (cf. below) but a dendogram seemed to give a nicer presentation. (It's a png since github doesn't allow SVG uploads).
|
Very cool, @pkra ! I think this is much better than no diagram at all. I guess very basic multiple inheritance can be added in parentheses after the role name, i.e.
And maybe supported/required* attributes can be added in square brackets after the role name, like an array, i.e.
That would be easy, but it might look way messier (we can decide how much to add based on legibility). We would have to describe the "notation" in the diagram's description if we went this route. |
Thanks 😊 I'll find time to move the example code somewhere public then.
I also thought about radial layout -- lots of other examples at https://observablehq.com/collection/@d3/d3-hierarchy. Since the diagram will live outside the spec, we could think about more options, especially if it's just a d3 configuration switch.
Thanks for those ideas! I like them for their simplicity. |
To follow up on
I'm somewhat undecided after realizing we have slightly more complex cases, e.g., gridcell (cell) -> columnheader (gridcell (cell)). Maybe a simple indicator for multples (e.g., asterisk) could be sufficient. |
Agreed! We can get fancy later. :) |
Coming back to this. A vertical layout seems trickier to me since the text adds a lot of width (the associationList roles are particularly troublesome). This makes it difficult to get a decent layout. Here's a horizonal tidy tree for comparison with the cluster / dendogram from my earlier comment. |
That looks great! I would have called that layout "vertical". I guess I need to update my tree terminology. :) |
Thanks, @carmacleod.
No, my bad! I didn't think about terminology. |
Finally got around to pushing something to github. I scraped the data pretty naively from the spec. |
Wow, @pkra. Very cool. So, I went back and forth many times between Tree and Dendogram, and I think I have a slight preference for Tree, because:
The flowchart is interesting, but the lines are really really hard to follow. Thanks so much for doing this! |
@jnurthen Can you create https://www.w3.org/WAI/ARIA/1.3/class-diagram/ ? How do we add @pkra's Tree diagram there? We should re-generate the Tree diagram because of #1354, and then I would be happy to create a PR that links to https://www.w3.org/WAI/ARIA/1.3/class-diagram/ from the place in the spec. |
@carmacleod no I can't. @michael-n-cooper is the only one who can modify those pages. |
FYI I've updated my d3 diagram with freshly scraped data. (There's now also a branch with a navigable tree.) |
Happy to regenerate anytime (but wouldn't mind a review of the scraper). This could just be a github action in the long run. |
@pkra are you aware of https://github.com/w3c/aria/blob/master/common/script/roleInfo.js ? It might avoid you scraping the spec. |
Evidently not - thanks! I'll look into modifying the diagram to digest that data. It should allow for an evergreen diagram fetching the latest version of that file from github.io. |
I thought it might 👍 |
Yes, fetching from branches occurred to me, too. Could be a query string or some such. Since the output is just SVG (ignoring the transitions), it could also just be saved once for publications branches (to avoid JS dependencies, later breaking changes etc). |
Here's a copden pulling in the "correct" data https://codepen.io/pkra/pen/bGwBzGZ?editors=1010 (and also adding a tree navigation) |
It either need to be either kept up to date or removed.
While I think it is useful it is not useful if it is not accurate.
https://www.w3.org/TR/wai-aria-1.2/#roles_categorization
See https://web-a11y.slack.com/archives/C042TSFGQ/p1585040058001800 for people trying to use it.
The text was updated successfully, but these errors were encountered: