Skip to content

Commit

Permalink
feat: update to latest schemas from the Nu HTML Checker
Browse files Browse the repository at this point in the history
---------------------

docs: switch to higher quality reference for alternative text

Co-authored-by: Jens Oliver Meiert <[email protected]>

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

switch to higher quality reference for alternative text

fixes #1146

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

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

ARIA: Allow aria-required with special input types

Add aria-required to input types datetime-local / date / month / time / week

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

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

Allow rel attribute on SVG <a> element

Fixes validator/validator#1008
Closes validator/validator#1009

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

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

Allow any ARIA role for <svg> element

Fixes validator/validator#1096
Fixes validator/validator#981

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

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

Allow aria.prop.posinset|setsize w/ role=tab

Fixes validator/validator#1060

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

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

Allow “aria-placeholder” where “placeholder” is allowed

Also, report error if element with “placeholder” also has
“aria-placeholder”.

Fixes validator/validator#1098

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

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

Allow only presentation|none for br[role]

Fixes validator/validator#1097

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

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

Update required states for input[type=radio|checkbox]

Fixes validator/validator#1109

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

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

Update allowed roles for figure element

Fixes validator/validator#1108

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

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

Allow th[aria-rowspan] & th[aria-colspan]

Relates to validator/validator#1107

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

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

Allow math element to have global ARIA attributes

Fixes validator/validator#1114

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

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

Add menu, menubar, and tablist to allowed nav roles

Fixes validator/validator#1110

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

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

Align aria-valuemin checking with current spec

Fixes validator/validator#1120

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

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

Align aria-valuemax checking with current spec

Fixes validator/validator#1119

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

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

Allow aria-description

Fixes validator/validator#1155

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

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

Allow -1 for aria-setsize

Fixes validator/validator#1158

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

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

update the allowed roles for wbr

update allowed roles for `wbr` to match `br` element

Co-authored-by: Scott O'Hara <[email protected]>
  • Loading branch information
rdeltour and scottaohara committed Aug 18, 2022
1 parent e41536a commit b6086e6
Show file tree
Hide file tree
Showing 13 changed files with 151 additions and 87 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ include "./mod/epub-svg-inc.rnc" {
common.elem.phrasing |= svg
common.elem.phrasing |= math

math.attributes &= aria.global?

svg.title.content |= common.elem.phrasing

svg.foreignObject.content |=
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
224d49b95e1ec27706652639fad85ecec1b8291e
9b11254fbe3c5cb2339794101e17e7d8ec844223
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ aria.global =
& aria.prop.owns?
& aria.prop.relevant?
& aria.prop.roledescription?
& aria.prop.description?
)

common.attrs.other &= aria.global?
Expand Down Expand Up @@ -144,7 +145,6 @@ common.attrs.aria.implicit.searchbox |=
( aria.prop.activedescendant?
& aria.prop.autocomplete?
& aria.prop.multiline?
& aria.prop.placeholder?
& aria.prop.readonly?
& aria.prop.required?
)
Expand Down Expand Up @@ -198,6 +198,10 @@ common.attrs.aria.implicit.column-or-row-header |=
( aria.prop.sort?
& aria.prop.readonly?
& aria.prop.required?
& aria.prop.colspan?
& aria.prop.colindex?
& aria.prop.rowspan?
& aria.prop.rowindex?
& aria.state.selected?
& aria.state.expanded?
)
Expand Down Expand Up @@ -397,6 +401,12 @@ common.attrs.aria.implicit.navigation |= common.attrs.aria.implicit.landmark
common.data.idrefs #REVISIT add Schematron check
}

## description
aria.prop.description =
attribute aria-description {
string
}

## details
aria.prop.details =
attribute aria-details {
Expand Down Expand Up @@ -584,7 +594,9 @@ common.attrs.aria.implicit.navigation |= common.attrs.aria.implicit.landmark
## setsize
aria.prop.setsize =
attribute aria-setsize {
common.data.integer.non-negative
( common.data.integer.non-negative
| string "-1"
)
}

## sort
Expand Down Expand Up @@ -695,6 +707,7 @@ common.attrs.aria.implicit.navigation |= common.attrs.aria.implicit.landmark
aria.cell =
( aria.role.cell
& aria.prop.colspan?
& aria.prop.colindex?
& aria.prop.rowspan?
& aria.prop.rowindex?
)
Expand Down Expand Up @@ -873,6 +886,7 @@ common.attrs.aria.implicit.navigation |= common.attrs.aria.implicit.landmark
& aria.state.expanded?
& aria.prop.required?
& aria.prop.colspan?
& aria.prop.colindex?
& aria.prop.rowspan?
& aria.prop.rowindex?
)
Expand Down Expand Up @@ -1086,6 +1100,13 @@ common.attrs.aria.implicit.navigation |= common.attrs.aria.implicit.landmark
common.attrs.aria |= aria.menuitemcheckbox
common.attrs.aria.role.menuitemcheckbox |= aria.menuitemcheckbox

## menuitemcheckbox w/o checked required
aria.menuitemcheckbox-checked-not-required =
( aria.role.menuitemcheckbox )
aria.role.menuitemcheckbox-checked-not-required =
attribute role { string "menuitemcheckbox" }
common.attrs.aria.role.menuitemcheckbox-checked-not-required |= aria.menuitemcheckbox-checked-not-required

## menuitemradio
aria.menuitemradio =
( aria.role.menuitemradio
Expand All @@ -1100,6 +1121,17 @@ common.attrs.aria.implicit.navigation |= common.attrs.aria.implicit.landmark
common.attrs.aria |= aria.menuitemradio
common.attrs.aria.role.menuitemradio |= aria.menuitemradio

## menuitemradio w/o checked required
aria.menuitemradio-checked-not-required =
( aria.role.menuitemradio
& aria.state.selected?
& aria.prop.posinset?
& aria.prop.setsize?
)
aria.role.menuitemradio-checked-not-required =
attribute role { string "menuitemradio" }
common.attrs.aria.role.menuitemradio-checked-not-required |= aria.menuitemradio-checked-not-required

## navigation
aria.navigation =
( aria.role.navigation
Expand Down Expand Up @@ -1257,7 +1289,6 @@ common.attrs.aria.implicit.navigation |= common.attrs.aria.implicit.landmark
& aria.prop.activedescendant?
& aria.prop.autocomplete?
& aria.prop.multiline?
& aria.prop.placeholder?
& aria.prop.readonly?
& aria.prop.required?
)
Expand Down Expand Up @@ -1357,11 +1388,20 @@ common.attrs.aria.implicit.navigation |= common.attrs.aria.implicit.landmark
common.attrs.aria |= aria.switch
common.attrs.aria.role.switch |= aria.switch

## switch w/o checked required
aria.switch-checked-not-required =
( aria.role.switch )
aria.role.switch-checked-not-required =
attribute role { string "switch" }
common.attrs.aria.role.switch-checked-not-required |= aria.switch-checked-not-required

## tab
aria.tab =
( aria.role.tab
& aria.state.selected?
& aria.state.expanded?
& aria.prop.posinset?
& aria.prop.setsize?
)
aria.role.tab =
attribute role { string "tab" }
Expand Down Expand Up @@ -1421,7 +1461,6 @@ common.attrs.aria.implicit.navigation |= common.attrs.aria.implicit.landmark
& aria.prop.activedescendant?
& aria.prop.autocomplete? # not inherited
& aria.prop.multiline? # not inherited
& aria.prop.placeholder?
& aria.prop.readonly? # not inherited
& aria.prop.required?
)
Expand Down
Loading

0 comments on commit b6086e6

Please sign in to comment.