-
Notifications
You must be signed in to change notification settings - Fork 14
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
Update build process to use data-skipto attribute to configure skipto.js #259
Comments
Yesterday I misspoke. Except for patterns.html and practices.html, which are still not sourced from aria-practices, we can handle this completely from the aria-practices side. Except for those two pages, the script tags are all in the content files. I pushed a commit to #2807 that updates the script tags. So, as far as wai-aria-practices repo build is concerned, I think we only need to address patterns.html and practices.html, which we wouldn't have to do if we had completed w3c/aria-practices#2702. I am tempted to say we need to prioritize 2702 in 4Q. |
So, after working on w3c/aria-practices#2807 a little more, I found that there are three pages for which we cannot control the presentation of skipto from the aria-practices repo:
I added the new script tag to the home page file, but it is ignored by the build. It would be nice if we could fix that so that it is not ignored or overridden. So, I think there are two changes to make to the build process to resolve this issue:
|
Most of the work for this issue could end up being addressed when we work on w3c/aria-practices#2702. So, I have bumped 2702 to P1 and this down to p2 in the Q4 infra project. |
@mcking65 @jongund the support for this has now been included in #292, which has been reviewed and ready to merge. w3c/aria-practices#2807 will need to add the script tag to |
Updates skipto.js to use version 5.2.1 without APG specific modifications. In lieu of modifying the script, the script import now specifies parameters for the desired behaviors. This required changing the script import on every page to include the following data attribute: ``` <script data-skipto="colortheme: aria; displayoption: popup" src="../../shared/js/skipto.js"></script> ``` This is related to [issue 259](w3c/wai-aria-practices#259) in wai-aria-practices repository. --------- Co-authored-by: Matt King <[email protected]> Co-authored-by: Howard Edwards <[email protected]>
I would like to update
skipto.js
to use the standard distribution. Right now I created a customized version ofskipto.js
for the APG that sets the defaultcolorTheme
to use thearia
option and fordisplayOption
the 'popup` option.The
data-skipto
attribute can be put on thescript
element referencingskipto.js
, for example:I have created a PR 2807 in the
aria-practices
repository for the current production version ofskipto.js
.It can also be downloaded or referenced from:
https://github.com/skipto-landmarks-headings/page-script-5/tree/main/dist
The text was updated successfully, but these errors were encountered: