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

feat: update to latest schemas from the Nu HTML Checker #1530

Merged
merged 2 commits into from
Jul 7, 2023

Conversation

rdeltour
Copy link
Member

@rdeltour rdeltour commented Jul 6, 2023


Add plaintext-only value to contenteditable attribute

validator/validator@228ea687b


add warnings for deprecated ARIA attributes (#1560)

validator/validator@e61fbeb2c


disallow aria attributes on datalist (#1557)

validator/validator@b4849c04b


allow role=button on area

validator/validator@89ff1fc2b


fix: allow -1 for aria-colcount

validator/validator@2466e73c4


fix: Allow -1 for aria-rowcount

validator/validator@eac205b6b


Add fetchpriority attribute

validator/validator@7c9991405


Script type importmap (#1478)

validator/validator@4054c56f5


Move “manifest” attribute to legacy-attributes list

validator/validator@175e62d3a


Pointer Events (#1481)

validator/validator@5eb52a931


Report a better error message for obsolete “manifest” attribute

validator/validator@ae924b625


onscrollend

validator/validator@87287a97f


slot element

validator/validator@d6cf423c1


Allow paragraphs in hgroup (#1467)

validator/validator@3ff53973f


blocking="render" (#1466)

validator/validator@df5d4e23a


inert

validator/validator@507f551b2


hidden=until-found

validator/validator@a424d55a8


media attribute in meta element

validator/validator@af3e94d22


Sync event handlers

validator/validator@58bea51c7


Remove manifest attribute

validator/validator@66510f3ca


enterkeyhint

validator/validator@70f3044d7


Form method dialog (#1443)

validator/validator@0db229a44


imagesrcset and imagesizes in link (#1444)

validator/validator@49656dbfc


feat: add support width and height of source in picture

validator/validator@176d98e4f


Update: allow none/presentation on nav element (#1323)

validator/validator@5e25edb39


Update schema/html5/web-forms.rnc

validator/validator@95ba6c7cf


update role allowances for button and input type=button

validator/validator@6cc14c4d7


adds role=radio alowance to img alt=foo

validator/validator@b013aa02b


remove deprecated dpub role allowances

validator/validator@b0fb152c0


allow section element to have role=group

validator/validator@078341d37

@rdeltour rdeltour added this to the Next maintenance release milestone Jul 6, 2023
@rdeltour rdeltour self-assigned this Jul 6, 2023
@rdeltour rdeltour requested a review from mattgarrish July 7, 2023 08:44
@rdeltour
Copy link
Member Author

rdeltour commented Jul 7, 2023

@mattgarrish, I'd like your input on this one.

This new round of update includes validator/validator@cf03b5a, which removed doc-endnote and doc-biblioentry as allowed roles on li (apparently I didn't in fact update the schema since earlier, my bad).

While I understand the reason for the HTML checker, raising an error sound a bit drastic for EPUBCheck. I'm considering re-adding the roles to our version of the schema and raising a bespoke warning instead. WDYT?

---------------------

Add `plaintext-only` value to `contenteditable` attribute

validator/validator@228ea687b

Co-authored-by: Niedziolka Michal <[email protected]>

---------------------

add warnings for deprecated ARIA attributes (#1560)

validator/validator@e61fbeb2c

Co-authored-by: Steve Faulkner <[email protected]>

---------------------

disallow aria attributes on datalist (#1557)

validator/validator@b4849c04b

Co-authored-by: Steve Faulkner <[email protected]>

---------------------

allow role=button on area

validator/validator@89ff1fc2b

Co-authored-by: stevefaulkner <[email protected]>

---------------------

fix: allow -1 for aria-colcount

validator/validator@2466e73c4

Co-authored-by: Nick Schonning <[email protected]>

---------------------

fix: Allow -1 for aria-rowcount

validator/validator@eac205b6b

Co-authored-by: Nick Schonning <[email protected]>

---------------------

Add `fetchpriority` attribute

validator/validator@7c9991405

Co-authored-by: Niedziolka Michal <[email protected]>

---------------------

Script type importmap (#1478)

validator/validator@4054c56f5

Co-authored-by: Michał Niedziółka <[email protected]>

---------------------

Move “manifest” attribute to legacy-attributes list

validator/validator@175e62d3a

Co-authored-by: Michael[tm] Smith <[email protected]>

---------------------

Pointer Events (#1481)

validator/validator@5eb52a931

Co-authored-by: Michał Niedziółka <[email protected]>

---------------------

Report a better error message for obsolete “manifest” attribute

validator/validator@ae924b625

Co-authored-by: Michael[tm] Smith <[email protected]>

---------------------

onscrollend

validator/validator@87287a97f

Co-authored-by: Niedziolka Michal <[email protected]>

---------------------

slot element

validator/validator@d6cf423c1

Co-authored-by: Niedziolka Michal <[email protected]>

---------------------

Allow paragraphs in hgroup (#1467)

validator/validator@3ff53973f

Co-authored-by: Michał Niedziółka <[email protected]>

---------------------

blocking="render" (#1466)

validator/validator@df5d4e23a

Co-authored-by: Michał Niedziółka <[email protected]>

---------------------

inert

validator/validator@507f551b2

Co-authored-by: Niedziolka Michal <[email protected]>

---------------------

hidden=until-found

validator/validator@a424d55a8

Co-authored-by: Niedziolka Michal <[email protected]>

---------------------

media attribute in meta element

validator/validator@af3e94d22

Co-authored-by: Niedziolka Michal <[email protected]>

---------------------

Sync event handlers

validator/validator@58bea51c7

Co-authored-by: Niedziolka Michal <[email protected]>

---------------------

Remove manifest attribute

validator/validator@66510f3ca

Co-authored-by: Niedziolka Michal <[email protected]>

---------------------

enterkeyhint

validator/validator@70f3044d7

Co-authored-by: Niedziolka Michal <[email protected]>

---------------------

Form method dialog (#1443)

validator/validator@0db229a44

Co-authored-by: Michał Niedziółka <[email protected]>

---------------------

imagesrcset and imagesizes in link (#1444)

validator/validator@49656dbfc

Co-authored-by: Michał Niedziółka <[email protected]>

---------------------

feat: add support width and height of source in picture

validator/validator@176d98e4f

Co-authored-by: Takeshi Kurosawa <[email protected]>

---------------------

Update: allow none/presentation on nav element (#1323)

validator/validator@5e25edb39

Co-authored-by: Scott O'Hara <[email protected]>

---------------------

Update schema/html5/web-forms.rnc

validator/validator@95ba6c7cf

Co-authored-by: Michael[tm] Smith <[email protected]>

---------------------

update role allowances for button and input type=button

validator/validator@6cc14c4d7

Co-authored-by: Scott O'Hara <[email protected]>

---------------------

adds role=radio alowance to img alt=foo

validator/validator@b013aa02b

Co-authored-by: Scott O'Hara <[email protected]>

---------------------

remove deprecated dpub role allowances

validator/validator@b0fb152c0

Co-authored-by: Scott O'Hara <[email protected]>

---------------------

allow section element to have role=group

validator/validator@078341d37

Co-authored-by: Scott O'Hara <[email protected]>
@mattgarrish
Copy link
Member

raising an error sound a bit drastic for EPUBCheck

Ya, it's not like using the roles really breaks anything. The inheritance model they break is a technical spec issue not a real problem that affects AT.

They shouldn't be used anymore, but 1.1 isn't even a REC yet. A warning sounds better than an error.

@mattgarrish
Copy link
Member

The test to catch the roles is a bit limited. It only checks for the roles on li instead of all elements that accept any role. Because you can have <div role="list">, for example, you can have <div role="doc-endnote"> as a child of it. (See example 18 in the 1.0 spec.)

Base automatically changed from fix/1522/edit-content-model to main July 7, 2023 12:54
@rdeltour
Copy link
Member Author

rdeltour commented Jul 7, 2023

Yeah I know. That was more or less intentional, as I think this is not used a lot and the HTML validator does not catch these either.
But adding a naive fix (parent/child only) in Schematron should be straightforward.

@rdeltour
Copy link
Member Author

rdeltour commented Jul 7, 2023

But adding a naive fix (parent/child only) in Schematron should be straightforward.

Or maybe even simpler: shouldn't a warning be raised whenever one of these deprecated role is used, regardless of the semantic of the holding element and ancestor?

@mattgarrish
Copy link
Member

shouldn't a warning be raised whenever one of these deprecated role is used, regardless of the semantic of the holding element and ancestor?

Yes, I wouldn't worry about whether there's a list ancestor or not, or what roles the element should accept. That's kind of moot. If any element has a role attribute with doc-endnote or doc-biblioentry, it should raise a warning.

The roles `doc-endnote` and `doc-biblioentry` are deprecated in ARIA 1.1, and authors should not use them on list items.

The HTML validator (validator.nu) raises an error when these roles are set on `li` elements.

This commit implements a more permissive approach for EPUBCheck:
- the roles are re-added the HTML schema
- we raise a warning (RSC-017) when the roles are present on `li` elements
@rdeltour
Copy link
Member Author

rdeltour commented Jul 7, 2023

Done.

@rdeltour rdeltour merged commit 5c39157 into main Jul 7, 2023
4 checks passed
@rdeltour rdeltour deleted the feat/schema-update branch July 7, 2023 13:26
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

2 participants