Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jongund committed Dec 24, 2024
1 parent e4d2420 commit 23aa202
Show file tree
Hide file tree
Showing 17 changed files with 46 additions and 61 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Version history for SkipTo.js

## Version 5.7.1
* Fixed bug with shortcut navigation getting stuck in "Skip To Content" button

## Version 5.7
* Added keyboard shortcuts for navigation to landmark regions and headings
* Fixed bug with 'main-only' option for headings
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) (Version 5.7) 2022, 2023, 2024 Jon Gunderson; Licensed BSD
Copyright (c) (Version 5.7.1) 2022, 2023, 2024, 2025 Jon Gunderson; Licensed BSD

Copyright (c) 2021 PayPal Accessibility Team and University of Illinois; Licensed BSD

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "skipto",
"version": "5.7",
"version": "5.7.1",
"homepage": "https://github.com/skipto-landmarks-headings/page-script-5",
"authors": [
"Jon Gunderson, Open Web Accessibility and University of Illinois"
Expand Down
Binary file added docs/dist/skipto-for-chrome-1.1.1.zip
Binary file not shown.
Binary file added docs/dist/skipto-for-firefox-1.1.1.zip
Binary file not shown.
15 changes: 6 additions & 9 deletions docs/dist/skipto.js
Original file line number Diff line number Diff line change
Expand Up @@ -1834,10 +1834,7 @@ div#skip-to-message.fade {
'style',
'template',
'shadow',
'title',
'skip-to-content',
'skip-to-content-bookmarklet',
'skip-to-content-extension'
'title'
];

const allowedLandmarkSelectors = [
Expand Down Expand Up @@ -4692,14 +4689,14 @@ div#skip-to-message.fade {
debug$1.flag = false;


class SkipToContent570 extends HTMLElement {
class SkipToContent571 extends HTMLElement {

constructor() {
// Always call super first in constructor
super();
this.attachShadow({ mode: 'open' });
this.skipToId = 'id-skip-to';
this.version = "5.7";
this.version = "5.7.1";
this.buttonSkipTo = false;
this.initialized = false;

Expand Down Expand Up @@ -5138,7 +5135,7 @@ div#skip-to-message.fade {
if (!isExtensionLoaded) {
if (!isBookmarkletLoaded) {
removePageSkipTo();
window.customElements.define(SkipToBookmarkletElmName, SkipToContent570);
window.customElements.define(SkipToBookmarkletElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToBookmarkletElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand All @@ -5154,7 +5151,7 @@ div#skip-to-message.fade {
if (!isExtensionLoaded) {
removePageSkipTo();
removeBookmarkletSkipTo();
window.customElements.define(SkipToExtensionElmName, SkipToContent570);
window.customElements.define(SkipToExtensionElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToExtensionElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand All @@ -5167,7 +5164,7 @@ div#skip-to-message.fade {

default:
if (!isPageLoaded && !isBookmarkletLoaded && !isExtensionLoaded) {
window.customElements.define(SkipToPageElmName, SkipToContent570);
window.customElements.define(SkipToPageElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToPageElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand Down
2 changes: 1 addition & 1 deletion docs/dist/skipto.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/extension-chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "__MSG_extension_name_chrome__",
"version": "1.1",
"version": "1.1.1",
"description": "__MSG_extension_description__",
"homepage_url": "https://skipto-landmarks-headings.github.io/page-script-5/",
"default_locale": "en",
Expand Down
15 changes: 6 additions & 9 deletions src/extension-chrome/skipto.js
Original file line number Diff line number Diff line change
Expand Up @@ -1834,10 +1834,7 @@ div#skip-to-message.fade {
'style',
'template',
'shadow',
'title',
'skip-to-content',
'skip-to-content-bookmarklet',
'skip-to-content-extension'
'title'
];

const allowedLandmarkSelectors = [
Expand Down Expand Up @@ -4692,14 +4689,14 @@ div#skip-to-message.fade {
debug$1.flag = false;


class SkipToContent570 extends HTMLElement {
class SkipToContent571 extends HTMLElement {

constructor() {
// Always call super first in constructor
super();
this.attachShadow({ mode: 'open' });
this.skipToId = 'id-skip-to';
this.version = "5.7";
this.version = "5.7.1";
this.buttonSkipTo = false;
this.initialized = false;

Expand Down Expand Up @@ -5138,7 +5135,7 @@ div#skip-to-message.fade {
if (!isExtensionLoaded) {
if (!isBookmarkletLoaded) {
removePageSkipTo();
window.customElements.define(SkipToBookmarkletElmName, SkipToContent570);
window.customElements.define(SkipToBookmarkletElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToBookmarkletElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand All @@ -5154,7 +5151,7 @@ div#skip-to-message.fade {
if (!isExtensionLoaded) {
removePageSkipTo();
removeBookmarkletSkipTo();
window.customElements.define(SkipToExtensionElmName, SkipToContent570);
window.customElements.define(SkipToExtensionElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToExtensionElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand All @@ -5167,7 +5164,7 @@ div#skip-to-message.fade {

default:
if (!isPageLoaded && !isBookmarkletLoaded && !isExtensionLoaded) {
window.customElements.define(SkipToPageElmName, SkipToContent570);
window.customElements.define(SkipToPageElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToPageElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand Down
15 changes: 6 additions & 9 deletions src/extension-common/skipto.js
Original file line number Diff line number Diff line change
Expand Up @@ -1834,10 +1834,7 @@ div#skip-to-message.fade {
'style',
'template',
'shadow',
'title',
'skip-to-content',
'skip-to-content-bookmarklet',
'skip-to-content-extension'
'title'
];

const allowedLandmarkSelectors = [
Expand Down Expand Up @@ -4692,14 +4689,14 @@ div#skip-to-message.fade {
debug$1.flag = false;


class SkipToContent570 extends HTMLElement {
class SkipToContent571 extends HTMLElement {

constructor() {
// Always call super first in constructor
super();
this.attachShadow({ mode: 'open' });
this.skipToId = 'id-skip-to';
this.version = "5.7";
this.version = "5.7.1";
this.buttonSkipTo = false;
this.initialized = false;

Expand Down Expand Up @@ -5138,7 +5135,7 @@ div#skip-to-message.fade {
if (!isExtensionLoaded) {
if (!isBookmarkletLoaded) {
removePageSkipTo();
window.customElements.define(SkipToBookmarkletElmName, SkipToContent570);
window.customElements.define(SkipToBookmarkletElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToBookmarkletElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand All @@ -5154,7 +5151,7 @@ div#skip-to-message.fade {
if (!isExtensionLoaded) {
removePageSkipTo();
removeBookmarkletSkipTo();
window.customElements.define(SkipToExtensionElmName, SkipToContent570);
window.customElements.define(SkipToExtensionElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToExtensionElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand All @@ -5167,7 +5164,7 @@ div#skip-to-message.fade {

default:
if (!isPageLoaded && !isBookmarkletLoaded && !isExtensionLoaded) {
window.customElements.define(SkipToPageElmName, SkipToContent570);
window.customElements.define(SkipToPageElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToPageElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand Down
2 changes: 1 addition & 1 deletion src/extension-firefox/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
}
},
"name": "__MSG_extension_name_firefox__",
"version": "1.1",
"version": "1.1.1",
"description": "__MSG_extension_description__",
"homepage_url": "https://skipto-landmarks-headings.github.io/page-script-5/",
"default_locale": "en",
Expand Down
15 changes: 6 additions & 9 deletions src/extension-firefox/skipto.js
Original file line number Diff line number Diff line change
Expand Up @@ -1834,10 +1834,7 @@ div#skip-to-message.fade {
'style',
'template',
'shadow',
'title',
'skip-to-content',
'skip-to-content-bookmarklet',
'skip-to-content-extension'
'title'
];

const allowedLandmarkSelectors = [
Expand Down Expand Up @@ -4692,14 +4689,14 @@ div#skip-to-message.fade {
debug$1.flag = false;


class SkipToContent570 extends HTMLElement {
class SkipToContent571 extends HTMLElement {

constructor() {
// Always call super first in constructor
super();
this.attachShadow({ mode: 'open' });
this.skipToId = 'id-skip-to';
this.version = "5.7";
this.version = "5.7.1";
this.buttonSkipTo = false;
this.initialized = false;

Expand Down Expand Up @@ -5138,7 +5135,7 @@ div#skip-to-message.fade {
if (!isExtensionLoaded) {
if (!isBookmarkletLoaded) {
removePageSkipTo();
window.customElements.define(SkipToBookmarkletElmName, SkipToContent570);
window.customElements.define(SkipToBookmarkletElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToBookmarkletElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand All @@ -5154,7 +5151,7 @@ div#skip-to-message.fade {
if (!isExtensionLoaded) {
removePageSkipTo();
removeBookmarkletSkipTo();
window.customElements.define(SkipToExtensionElmName, SkipToContent570);
window.customElements.define(SkipToExtensionElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToExtensionElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand All @@ -5167,7 +5164,7 @@ div#skip-to-message.fade {

default:
if (!isPageLoaded && !isBookmarkletLoaded && !isExtensionLoaded) {
window.customElements.define(SkipToPageElmName, SkipToContent570);
window.customElements.define(SkipToPageElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToPageElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand Down
2 changes: 1 addition & 1 deletion src/extension-opera/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "__MSG_extension_name_opera__",
"version": "1.1",
"version": "1.1.1",
"description": "__MSG_extension_description__",
"homepage_url": "https://skipto-landmarks-headings.github.io/page-script-5/",
"default_locale": "en",
Expand Down
15 changes: 6 additions & 9 deletions src/extension-opera/skipto.js
Original file line number Diff line number Diff line change
Expand Up @@ -1834,10 +1834,7 @@ div#skip-to-message.fade {
'style',
'template',
'shadow',
'title',
'skip-to-content',
'skip-to-content-bookmarklet',
'skip-to-content-extension'
'title'
];

const allowedLandmarkSelectors = [
Expand Down Expand Up @@ -4692,14 +4689,14 @@ div#skip-to-message.fade {
debug$1.flag = false;


class SkipToContent570 extends HTMLElement {
class SkipToContent571 extends HTMLElement {

constructor() {
// Always call super first in constructor
super();
this.attachShadow({ mode: 'open' });
this.skipToId = 'id-skip-to';
this.version = "5.7";
this.version = "5.7.1";
this.buttonSkipTo = false;
this.initialized = false;

Expand Down Expand Up @@ -5138,7 +5135,7 @@ div#skip-to-message.fade {
if (!isExtensionLoaded) {
if (!isBookmarkletLoaded) {
removePageSkipTo();
window.customElements.define(SkipToBookmarkletElmName, SkipToContent570);
window.customElements.define(SkipToBookmarkletElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToBookmarkletElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand All @@ -5154,7 +5151,7 @@ div#skip-to-message.fade {
if (!isExtensionLoaded) {
removePageSkipTo();
removeBookmarkletSkipTo();
window.customElements.define(SkipToExtensionElmName, SkipToContent570);
window.customElements.define(SkipToExtensionElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToExtensionElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand All @@ -5167,7 +5164,7 @@ div#skip-to-message.fade {

default:
if (!isPageLoaded && !isBookmarkletLoaded && !isExtensionLoaded) {
window.customElements.define(SkipToPageElmName, SkipToContent570);
window.customElements.define(SkipToPageElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToPageElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand Down
5 changes: 1 addition & 4 deletions src/landmarksHeadings.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,7 @@ const skipableElements = [
'style',
'template',
'shadow',
'title',
'skip-to-content',
'skip-to-content-bookmarklet',
'skip-to-content-extension'
'title'
];

const allowedLandmarkSelectors = [
Expand Down
8 changes: 4 additions & 4 deletions src/skipto.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* page or a bookmarlet will be ignored.
*/

import SkipToContent570 from './skiptoContent.js';
import SkipToContent571 from './skiptoContent.js';
import DebugLogging from './debug.js';

/* constants */
Expand Down Expand Up @@ -117,7 +117,7 @@ const SkipToBookmarkletID = `id-skip-to-bookmarklet`;
if (!isExtensionLoaded) {
if (!isBookmarkletLoaded) {
removePageSkipTo();
window.customElements.define(SkipToBookmarkletElmName, SkipToContent570);
window.customElements.define(SkipToBookmarkletElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToBookmarkletElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand All @@ -133,7 +133,7 @@ const SkipToBookmarkletID = `id-skip-to-bookmarklet`;
if (!isExtensionLoaded) {
removePageSkipTo();
removeBookmarkletSkipTo();
window.customElements.define(SkipToExtensionElmName, SkipToContent570);
window.customElements.define(SkipToExtensionElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToExtensionElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand All @@ -146,7 +146,7 @@ const SkipToBookmarkletID = `id-skip-to-bookmarklet`;

default:
if (!isPageLoaded && !isBookmarkletLoaded && !isExtensionLoaded) {
window.customElements.define(SkipToPageElmName, SkipToContent570);
window.customElements.define(SkipToPageElmName, SkipToContent571);
skipToContentElem = document.createElement(SkipToPageElmName);
skipToContentElem.setAttribute('version', skipToContentElem.version);
skipToContentElem.setAttribute('type', type);
Expand Down
4 changes: 2 additions & 2 deletions src/skiptoContent.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ const debug = new DebugLogging('skiptoContent', false);
debug.flag = false;


export default class SkipToContent570 extends HTMLElement {
export default class SkipToContent571 extends HTMLElement {

constructor() {
// Always call super first in constructor
super();
this.attachShadow({ mode: 'open' });
this.skipToId = 'id-skip-to';
this.version = "5.7";
this.version = "5.7.1";
this.buttonSkipTo = false;
this.initialized = false;

Expand Down

0 comments on commit 23aa202

Please sign in to comment.