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

Implicit and allowed roles for SVG element in a HTML document #372

Closed
lemnis opened this issue Dec 11, 2017 · 4 comments
Closed

Implicit and allowed roles for SVG element in a HTML document #372

lemnis opened this issue Dec 11, 2017 · 4 comments

Comments

@lemnis
Copy link

lemnis commented Dec 11, 2017

Related specs:

Both specifications define different implicit and allowed roles for the svg element. My first assumption was:

<html>
  <body>
    <svg> <!-- should validate against the html spec -->
      <svg> <!-- should validate against the svg2 spec -->
      </svg>
    </svg>
  </body>
</html>

But both are inside the SVG namespace, so I started wondering if my assumption is correct. And maybe the should only be validated to the SVG2 specification.

What is the correct behavior?

@dstorey
Copy link
Member

dstorey commented Mar 23, 2018

The definition in the SVG spec is correct I believe.

The specifications used by user agent developers to map the elements as follows:

Both define the default role to be "graphics-document". Both SVG AAM and the SVG spec state that there are no restrictions on the role that can be used by the author. Your millage probably varies on what browsers actually use however as SVG AAM and implementations of it are work in progress.

@AmeliaBR will correct me if I'm wrong :D

@AmeliaBR
Copy link
Contributor

@dstorey Not wrong!

The SVG-AAM needs a republication (I'm working on it!) to match what's in HTML-AAM and SVG2. The version David linked to is the Editor's Draft (updated); the TR version is out of date.

If ARIA in HTML still has the old mapping, it also needs an update.

There has been some discussion (in w3c/html-aam#43) about whether the graphics-document mapping should automatically simplify to an img mapping when the element does not have any accessible children. However, the same rules would apply for both the SVG with CSS layout box (the one that's a direct child of HTML) and a nested SVG.

@AmeliaBR
Copy link
Contributor

Just checked ARIA in HTML. That isn't even the old SVG-AAM mapping, not sure where it came from. Maybe an old draft of HTML-AAM?

@lemnis Can you file an issue on html-aria? Or would you prefer if I do?

@dstorey
Copy link
Member

dstorey commented May 2, 2018

Closing this issue as the SVG side of the spec is correct.

@dstorey dstorey closed this as completed May 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants