Observed behaviour
When the IMAGE browser extension is enabled, ordinary non-linked images on a webpage are modified to become keyboard-focusable. On https://image.a11y.mcgill.ca/tutorial/, the three content images on the page change from tabindexAttribute: null / tabIndex: -1 to tabindexAttribute: "0" / tabIndex: 0 after enabling the extension and reloading the page. This adds new tab stops to the host webpage and changes its normal sequential keyboard navigation even when the user is not actively trying to invoke IMAGE.
Expected behaviour
IMAGE should provide a keyboard-accessible way to invoke interpretations without unnecessarily changing the host page’s native tab order. Ordinary non-interactive images should remain outside the sequential keyboard focus order unless the page itself makes them focusable or interactive.
Reproduction
- Disable the IMAGE browser extension.
- Open
https://image.a11y.mcgill.ca/tutorial/ in Chrome.
- Open the developer console.
- Run:
[...document.images]
.filter(img => !img.closest("a"))
.map(img => ({
alt: img.alt,
tabindexAttribute: img.getAttribute("tabindex"),
tabIndex: img.tabIndex
}));
- Observe that the page’s three non-linked content images report
tabindexAttribute: null and tabIndex: -1.
- Enable the IMAGE browser extension.
- Reload the page.
- Run the same command again.
- Observe that the same three images now report
tabindexAttribute: "0" and tabIndex: 0.
- Tab through the page and observe that these static images now participate in sequential keyboard navigation.
Runtime context
- Component:
IMAGE-browser
- Page used for reproduction:
https://image.a11y.mcgill.ca/tutorial/
- Browser: Chrome
- Extension state: reproducible when IMAGE is enabled and the page is reloaded
- Relevant implementation:
src/content.ts adds tabindex="0" to non-linked images, and Ctrl+B processing depends on document.activeElement.tagName == "IMG".
Additional context
This behavior appears to be the implemented result of issue #22, which proposed adding tabindex="0" to images so they could be reached through keyboard navigation and stated that it should not affect site behavior. The new reproduction shows that it does affect site behavior by altering the host page’s tab order. A later issue, #387, also recognized that per-graphic keyboard navigation additions can slow user navigation, and the current Ctrl+B trigger seems to be coupled to this focusability approach.
Observed behaviour
When the IMAGE browser extension is enabled, ordinary non-linked images on a webpage are modified to become keyboard-focusable. On
https://image.a11y.mcgill.ca/tutorial/, the three content images on the page change fromtabindexAttribute: null/tabIndex: -1totabindexAttribute: "0"/tabIndex: 0after enabling the extension and reloading the page. This adds new tab stops to the host webpage and changes its normal sequential keyboard navigation even when the user is not actively trying to invoke IMAGE.Expected behaviour
IMAGE should provide a keyboard-accessible way to invoke interpretations without unnecessarily changing the host page’s native tab order. Ordinary non-interactive images should remain outside the sequential keyboard focus order unless the page itself makes them focusable or interactive.
Reproduction
https://image.a11y.mcgill.ca/tutorial/in Chrome.tabindexAttribute: nullandtabIndex: -1.tabindexAttribute: "0"andtabIndex: 0.Runtime context
IMAGE-browserhttps://image.a11y.mcgill.ca/tutorial/src/content.tsaddstabindex="0"to non-linked images, andCtrl+Bprocessing depends ondocument.activeElement.tagName == "IMG".Additional context
This behavior appears to be the implemented result of issue #22, which proposed adding
tabindex="0"to images so they could be reached through keyboard navigation and stated that it should not affect site behavior. The new reproduction shows that it does affect site behavior by altering the host page’s tab order. A later issue, #387, also recognized that per-graphic keyboard navigation additions can slow user navigation, and the currentCtrl+Btrigger seems to be coupled to this focusability approach.