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
Addressed role of heading on h* elements #371
Conversation
As per issue #370, the generation of role="heading" on h* elements is not actually permitted by the HTML5 Recommendation and causes problems with some assistive technology implementations. Changed the strategy so roles of heading are only placed on headings within notes and issues. In order to preserve the semantic data that explicit roles can generate via RDFa, also added RDFa markup that maps to the implied RDFa that would have been derived from the role values were they still present.
Can you take a look at this @marcoscaceres ? I think the change is pretty clean, and I have tested the output, but I don't want to integrate it without another set of eyes. |
LGTM |
Addressed role of heading on h* elements
Stupid question @gkellogg - given that RDFa Lite does not permit the about attribute, how would you suggest specifying the subject of these triples. The triple should be SomeFragment has a role of 'heading'. Ideas? |
You're already in the chapter context, where we've generated |
But the fragment ID for the section is NOT the fragment ID for the header element. It is for the entire section. The heading element needs its own ID. Which is trivial but it means wrapping the content of the Heading in a span so we can establish a subject and an object. |
Conflicts: js/core/rdfa.js Needed to resolve conflicts with the changes from #371. There was also a logic flaw that caused the RDFa annotations to be applied to child elements of a section element even if they were not headings. Finally, a change from #371 was generating funny looking IDs for headers on notes and issues.
You already have a span for the scene, as I showed above, you just need a |
Is there a predicate that relates the section identifier to it's header? The sections are all connected using bibo:hasPart, it would be nice to context the section to it's header. |
Fix: missed a check for presence of predictor & baselines
As per issue #370, the generation of role="heading"
on h* elements is not actually permitted by the HTML5
Recommendation and causes problems with some assistive
technology implementations. Changed the strategy so
roles of heading are only placed on headings within notes and
issues. In order to preserve the semantic data that explicit
roles can generate via RDFa, also added RDFa markup that maps
to the implied RDFa that would have been derived from the role
values were they still present.