Skip to content

pkp/immersion#134 Skip to content link not visible - adding SkipTo.JS component#159

Open
israelcefrin wants to merge 2 commits into
pkp:mainfrom
israelcefrin:i134_skip_to_content
Open

pkp/immersion#134 Skip to content link not visible - adding SkipTo.JS component#159
israelcefrin wants to merge 2 commits into
pkp:mainfrom
israelcefrin:i134_skip_to_content

Conversation

@israelcefrin

Copy link
Copy Markdown
Contributor

Fixing the "skip to" hidden menu adding an open source Skipto.JS component to fix it.

This component has been already presented by @Godoy0722 to the Dev team for the ORE project.

Issue: #134

@kaitlinnewson kaitlinnewson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @israelcefrin, I've made a few suggestions here - let me know if anything is unclear!

'contexts' => 'backend-manageIssues',
]);

HookRegistry::add('TemplateManager::display', [$this, 'addCustomHeader']);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather than using the hook approach, I think you could instead add the js file path to gulpfile.js (under gulp.task('scripts', function()), then add the custom script here with something like:

        $this->addScript(
            'skip-to-js',
            "var SkipToConfig = {
                displayOption: 'popup',
                landmarks: 'main search navigation header footer',
                headings: ' h1 h2',
                colorTheme: 'openweba11y',
                highlightTarget: 'smooth'
            };",
            ['inline' => true]
        );

... and then you could remove the addCustomHeader function below as well.

By adding it to the gulp file, it's included in the build packages (see the README with more info about that if needed).

Comment thread js/skipto.js

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be replaced with the minified version and moved to resources/dist/js.

@github-project-automation github-project-automation Bot moved this from Ready for review/testing to In progress in Accessibility (themes) Apr 14, 2026
@kaitlinnewson kaitlinnewson linked an issue Apr 14, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

[A11Y] Skip to content link not visible on keyboard focus

2 participants