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

Addressed role of heading on h* elements #371

Merged
merged 1 commit into from Dec 17, 2014
Merged

Addressed role of heading on h* elements #371

merged 1 commit into from Dec 17, 2014

Conversation

halindrome
Copy link
Contributor

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.

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.
@halindrome
Copy link
Contributor Author

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.

@marcoscaceres
Copy link
Member

LGTM

halindrome added a commit that referenced this pull request Dec 17, 2014
Addressed role of heading on h* elements
@halindrome halindrome merged commit 050c01f into develop Dec 17, 2014
@halindrome
Copy link
Contributor Author

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?

@gkellogg
Copy link
Member

You're already in the chapter context, where we've generated <section class="informative" id="informative-section" typeof="bibo:Chapter" resource="#informative-section" property="bibo:hasPart">, the subject is already defined, is it not? You could then just output <span class="secno" property="xhv:role" resource="xhv:heading">. This doesn't work for #abstract, #toc, and #sotd, as they don't establish a subject, but that's probably not important.

@halindrome
Copy link
Contributor Author

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.

halindrome added a commit that referenced this pull request Dec 17, 2014
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.
@gkellogg
Copy link
Member

You already have a span for the scene, as I showed above, you just need a @resource definition on the containing header to establish the subject for that span.

@gkellogg
Copy link
Member

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.

@marcoscaceres marcoscaceres deleted the p-370 branch September 12, 2015 21:36
shikhar-scs pushed a commit to shikhar-scs/respec that referenced this pull request Feb 19, 2018
Fix: missed a check for presence of predictor & baselines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants