Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

revisit data-* attributes #96

Closed
pkra opened this issue Jun 20, 2017 · 7 comments
Closed

revisit data-* attributes #96

pkra opened this issue Jun 20, 2017 · 7 comments
Assignees
Milestone

Comments

@pkra
Copy link
Member

pkra commented Jun 20, 2017

As we have moved away from htmlbook as a dependency, we should revisit the data attributes.

Some ideas

  • drop unused attributes (e.g., data-type="chapter")
  • name attributes consistently (e.g. data-ams, alternatively data-jats to reduce changes in ams-html)

Note: this originates in the mkb-hill3 QA report which suggests replacing data-type="chapter" with epub:type="chapter". This is not strictly necessary since in our workflow each file is exactly one chapter and epub3 specifies that in lieu of epub:type="chapter" and similar markup that's acceptable. If we do something, I'd rather adopt the dpub aria roles here (which epub will adopt in the future).


@pkra pkra self-assigned this Aug 23, 2017
@pkra
Copy link
Member Author

pkra commented Oct 2, 2018

Current list of data- attributes added in html output

  • 84 ocurrences + 1 comment text
  • 18 data-type (book, chapter, titlepage, copyright-page, footnote, sect[0-9], toc, bibliography, appendix, preface)
  • 65 data-jats & data-jats-* (many for ams-html)
  • 1 data-doi (but also data-jats="doi" - sigh)

@pkra pkra added this to the 2019Q2 milestone May 8, 2019
@pkra
Copy link
Member Author

pkra commented May 8, 2019

  • data-type attributes can be replaced with something like data-ams-sectioning since the non-sectioning values (footnotes) can be or are already processed via their role attributes.
  • data-jats can be replaced with data-ams since data-ams values do not appear as data-jats values (also for data-jats-* and data-ams-*)

Let's also fix data-jats-="mr" (note the trailing -).

@pkra
Copy link
Member Author

pkra commented May 8, 2019

For data-type, I'm leaning towards data-ams-doc (instead of data-ams-sectioning) since several can simply be dropped in favor of dpub aria roles (which are prefixed with doc-, e.g., doc-preface, doc-bibliography).

@pkra
Copy link
Member Author

pkra commented May 16, 2019

The main work has been merged. Let's test and see.

@pkra
Copy link
Member Author

pkra commented May 16, 2019

@pkra
Copy link
Member Author

pkra commented May 17, 2019

Visual regression tests showed no problems.

The only unexpected change were found in bproc34, mcom3351, mcom3354, mcom3358 which have sec@specific-use="paragraph" which will now end up getting the same styling as paragraphs (in ams-html), leading to (mild) additional margin-top.

I consider this an unexpected fix.

@pkra
Copy link
Member Author

pkra commented May 22, 2019

All fixed.

@pkra pkra closed this as completed May 22, 2019
@pkra pkra added the fixed label May 22, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant