Skip to content

Conversation

@julien-deramond
Copy link
Member

@julien-deramond julien-deramond commented Dec 20, 2025

This PR bumps the vnu-jar dev dependency from 25.11.25 to 25.12.20.

This new version of vnu-jar raises the new following errors that can be seen while running npm run docs:

Errors log (extract)
> [email protected] docs-vnu
> node build/vnu-jar.mjs

Running vnu-jar validation...
command used: java -jar "/Users/ju/twbs/bootstrap/node_modules/vnu-jar/build/dist/vnu.jar" --asciiquotes --skip-non-html --Werror --filterpattern "Attribute “autocomplete” is only allowed when the input type is.*|Attribute “autocomplete” not allowed on element “button” at this point.|An “aria-disabled” attribute whose value is “true” should not be specified on an “a” element that has an “href” attribute.|Attribute “is:raw” is not serializable as XML 1.0.|Attribute “is:raw” not allowed on element “code” at this point.|Trailing slash on void elements has no effect and interacts badly with unquoted attribute values.|Attribute “switch” not allowed on element “input” at this point." _site/ js/tests/
(node:55600) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use `node --trace-deprecation ...` to show where the warning was created)
"file:/Users/ju/twbs/bootstrap/_site/index.html":2.16863-2.16983: error: The "aria-labelledby" attribute must not be specified on any "div" element unless the element has a "role" value other than "caption", "code", "deletion", "emphasis", "generic", "insertion", "paragraph", "presentation", "strong", "subscript", or "superscript".
"file:/Users/ju/twbs/bootstrap/_site/index.html":109.148-109.260: error: Every active "role=tab" element must have a corresponding "role=tabpanel" element.
"file:/Users/ju/twbs/bootstrap/_site/index.html":109.980-109.1103: error: Every active "role=tab" element must have a corresponding "role=tabpanel" element.
"file:/Users/ju/twbs/bootstrap/_site/404.html":2.16916-2.17036: error: The "aria-labelledby" attribute must not be specified on any "div" element unless the element has a "role" value other than "caption", "code", "deletion", "emphasis", "generic", "insertion", "paragraph", "presentation", "strong", "subscript", or "superscript".

[...]

"file:/Users/ju/twbs/bootstrap/js/tests/visual/modal.html":41.7-41.107: error: The "aria-labelledby" attribute must not be specified on any "div" element unless the element has a "role" value other than "caption", "code", "deletion", "emphasis", "generic", "insertion", "paragraph", "presentation", "strong", "subscript", or "superscript".
"file:/Users/ju/twbs/bootstrap/js/tests/visual/modal.html":126.7-126.117: error: The "aria-labelledby" attribute must not be specified on any "div" element unless the element has a "role" value other than "caption", "code", "deletion", "emphasis", "generic", "insertion", "paragraph", "presentation", "strong", "subscript", or "superscript".
"file:/Users/ju/twbs/bootstrap/js/tests/visual/modal.html":150.7-150.144: error: The "aria-labelledby" attribute must not be specified on any "div" element unless the element has a "role" value other than "caption", "code", "deletion", "emphasis", "generic", "insertion", "paragraph", "presentation", "strong", "subscript", or "superscript".
"file:/Users/ju/twbs/bootstrap/js/tests/visual/tab.html":58.11-58.133: error: Every active "role=tab" element must have a corresponding "role=tabpanel" element.
ERROR: "docs-vnu" exited with 1.
ERROR: "docs-lint" exited with 1.

Analysis

Different use cases are present in these errors.

Warning

6fe6a76 is not a fix! It allows to spot where the issues raised by vnu-jar are located!

There seems to be two kinds of issues:

  • The presence of the aria-labelledby attribute for the <div>s related to modals and offcanvases
  • The presence of the role="tab" without any aria-controls (or any other modifications)

I'm not sure yet if these are false positives and would need to be hidden, or if we'd need to modify some examples/usages.
/cc @patrickhlauke

@patrickhlauke
Copy link
Member

thought i was having deja-vu ...

twbs/icons#2221

my fix for the offcanvas there twbs/icons#2222

@patrickhlauke
Copy link
Member

for offcanvas (and presumably modal is the same), we should have an appropriate role (like "region") even when they're not shown. additionally, we should change the JS to store the current value of role before turning the thing into an actual modal/offcanvas...and once it's closed, restore the original role (rather than just removing the attribute altogether)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants