w3c / html-aria

ARIA in HTML
https://w3c.github.io/html-aria/
Other
181 stars 48 forks source link

concerning use of doc-chapter #250

Closed dazrand closed 2 years ago

dazrand commented 3 years ago

There seems to be a mismatch between the application of ARIA role definitions and HTML5 tagging. Specifically the role “doc-chapter” is defined as "A major thematic section of content in a work.” The element <body> may receive the attribute epub:type “chapter” assigning this thematic identifier, however “doc-chapter” is not allowed at that level. Additionally, <article> could serve as a “doc-chapter” since chapters could be considered complete (and be distributed as such), but they cannot carry the identification. Was there a less obvious reason why this mismatch exists?

scottaohara commented 3 years ago

article currently lacks defined allowances for dpub, so seems that needs updating / this is quite a reasonable allowance.

use of doc-chapter on body seems odd to me? generally wouldn't think of redefining the body as an article or landmark role. is there a particular use case that would necessitate a body being defined as a doc-chapter, rather than sections of content within the body being defined with that role?

dazrand commented 3 years ago

Since <body> allows for epub:type="chapter" then it should allow for the matching aria role of doc-chapter. Using <body> as the chapter level construct is common in publishing, though using a subordinate <article> is a better approach structurally. Perhaps <body> should loose the "chapter" epub:type and be restricted to only document partitions.

scottaohara commented 3 years ago

though using a subordinate <article> is a better approach structurally.

would agree with this, and if one can structure their HTML at will, I would tend to err on the side of helping to promote better practices.

stevefaulkner commented 3 years ago

@dazrand

Since allows for epub:type="chapter" then it should allow for the matching aria role of doc-chapter.

I suggest these are 2 different things. the former is metadata the latter is part of the aural UI of the content. When a role is applied to an element its implicit role is overwritten in the browser accessibility tree, when epub:type="chapter" is used this does not occur.

dazrand commented 3 years ago

As you have noted, functionally they are two different things, however allowing the instance of metadata designating a element should be reflected in any aural UI as well. Since good ARIA use demands no override of <body> exist, this would tend to drive us to limit <body> epub:type to only document partitions.

pkra commented 3 years ago

As you have noted, functionally they are two different things, however allowing the instance of metadata designating a element should be reflected in any aural UI as well. Since good ARIA use demands no override of <body> exist, this would tend to drive us to limit <body> epub:type to only document partitions.

That would be an epub spec issue -- https://github.com/w3c/epub-specs/issues/1291 is possibly relevant (and this comment in particular https://github.com/w3c/epub-specs/issues/1291#issuecomment-521478123)

scottaohara commented 2 years ago

per the closure of the linked issue, i'm also thinking this issue should be closed. I don't think allowing this role on the body, which otherwise does not allow any role, makes sense at this time