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

ERROR RSC-005 thrown on role="doc-epigraph" #1019

Closed
atroia opened this issue Mar 19, 2019 · 12 comments · Fixed by #1142
Closed

ERROR RSC-005 thrown on role="doc-epigraph" #1019

atroia opened this issue Mar 19, 2019 · 12 comments · Fixed by #1142
Assignees
Labels
status: has PR The issue is being processed in a pull request type: spec The issue is related to a Specification update
Milestone

Comments

@atroia
Copy link

atroia commented Mar 19, 2019

Used role="doc-epigraph" in a section tag and I'm getting **ERROR RSC-005 : Error while parsing file: value of attribute "role" is invalid; **. I'm not seeing that this ARIA role has been deprecated or done away with.

@atroia
Copy link
Author

atroia commented Mar 19, 2019

role="doc-cover" also throwing the same error.

@rdeltour
Copy link
Member

doc-epigraph seems to be an omission on the roles allowed in section as defined in ARIA in HTML, wdyt @mattgarrish? If yes we should file an issue there.

doc-cover is an image role and MUST NOT be set to a section, so that’s a legit error.

For reference: the rules of where DPUB ARIA roles are allowed in HTML are defined in the ARIA in HTML specification.

@rdeltour rdeltour added status: in discussion The issue is being discussed by the development team type: spec The issue is related to a Specification update labels Mar 19, 2019
@TzviyaSiegman
Copy link
Collaborator

Good catch @rdeltour. @mattgarrish will you please log an issue on ARIA in HTML and the validator?

@mattgarrish
Copy link
Member

Only roles that have inherit from the abstract landmark role are allowed on section, so the error is correct (see the superclass roles in the DPUB-ARIA definition tables).

doc-epigraph inherits from the abstract section role, so it falls into the document structure category. It can be used on blockquote, div, etc.

(The section superclass is not the same as the section element, in one of ARIA's odder quirks.)

@rdeltour
Copy link
Member

Only roles that have inherit from the abstract landmark role are allowed on section

Then there are inconsistencies in ARIA in HTML: e.g. doc-abstract, doc-example, doc-qna, and others inherit from the "section" role and are allowed on the section element…

@rdeltour
Copy link
Member

Only roles that have inherit from the abstract landmark role are allowed on section

I'm not sure I understand why that should be the case however. Why the section element would be limited to landmark-inheriting roles? This isn't the case for other non-DPUB ARIA roles (see alert for instance).

@rdeltour
Copy link
Member

btw @atroia, while we're discussing all this (😊), you can always use the role doc-epigraph on the blockquote element, which likely makes the most sense in any case.

@mattgarrish
Copy link
Member

Why the section element would be limited to landmark-inheriting roles?

When we created the vocabulary, we were advised to assign landmark roles to the major sectional semantics and assign section to items that are not. That's why you won't find any mixing of section with the non-landmark roles in the examples.

I'm not sure why the ARIA document has mixed them, but we also weren't asked about the mapping in that document (that I remember). Definitely something we should clear up, as there may be assumed conditions on the use of the non-landmark roles (like no headings).

@atroia
Copy link
Author

atroia commented Mar 19, 2019

@rdeltour Thank you! That actually works out perfect, since I have an opening blockquote tag right below the section tag that I thought I needed. @mattgarrish I had no idea about the section superclass vs element, I still have so much to learn about ARIA.

@LaZay
Copy link

LaZay commented May 12, 2020

In HTML, a section can be recursively nested into a section. It is not possible to postulate that a section is ALWAYS used as a landmark. The parallel between section and TOC was just the most powerful and pedagogical example to show the interest of new HTML5 sections. It was not a requirement though. HTML5 has never put such a semantic constraint on section element definition.
https://www.w3.org/TR/2011/WD-html5-20110525/sections.html#the-section-element

@rdeltour rdeltour added status: has PR The issue is being processed in a pull request and removed status: in discussion The issue is being discussed by the development team labels Jun 22, 2020
@rdeltour rdeltour added this to the 4.2.3 milestone Jun 22, 2020
@flittle8
Copy link

Hi, wondering if you can confirm if it's legitimate to add epigraph semantics to the section tag as per the DAISY knowledge base?

@mattgarrish
Copy link
Member

Yes, it is allowed on section.

The ARIA in HTML document is the authoritative reference for which roles are allowed on which elements. We've worked out the discrepancies that used to exist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: has PR The issue is being processed in a pull request type: spec The issue is related to a Specification update
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants