This is a browser extension (for Firefox, Chrome, Opera and Edge) that enables navigation of WAI-ARIA landmarks, via the keyboard or a pop-up menu.
Landmark regions broadly signpost the areas of a page (e.g. navigation, search, main content and so on). They can make navigation considerably easier for people who use the keyboard to navigate and those using assistive technologies such as screen-readers, because they make it much quicker to get an overview and to navigate to (and between) areas of interest.
If you're a web author/developer, check out the information below on why landmarks rock, and how easy they are to put into your site—in fact, if you're using HTML 5, you probably already have landmarks on your site, but there are some ways to make them even more helpful, as discussed below.
Table of contents
- Installation and usage
- This extension's support for landmarks
- Information for web authors, designers and developers
Installation and usage
Use the installation links on the home page to install the extension. When it's installed, you will find documentation on topics such as:
- How to navigate by shortcut key, and how to change the shortcut keys.
- How to navigate using the toolbar pop-up.
- How to navigate using the sidebar (where supported).
- Border preferences, for landmark highlights and labels whilst navigating.
The rest of this file provides information that may be of help and interest to web authors, designers and developers, accessibility testers and browser extension developers.
This extension's support for landmarks
The Landmarks extension uses the Page Structural Semantics Scanner Tests suite; you can find information on standards support there.
Information for web authors, designers and developers
As described at start of this document, landmarks can really help various people get a quick overview of your site, and navigate it much more effectively. This can save them a lot of time, so please consider implementing landmarks on your site; here is some information to help you do so...
- Léonie Watson demonstrates landmarks (video)
- W3C ARIA landmarks example and advice page
- Easy content organisation with HTML5 (The Paciello Group 'blog article)
- Using WAI-ARIA landmarks (The Paciello Group 'blog article)
- W3C WCAG technique ARIA11: Using ARIA landmarks to identify regions of a page
Please bear in mind the following when implementing landmarks...
It's important that landmarks are not over-used, because their power comes from providing a concise overview of the content of the page. The heading hierarchy for the page can be relied upon for more fine-grained navigation within a particular area of a page.
Rule of thumb: Use as few landmarks as possible, but ensure that all of the content on the page is within a landmark region.
If you're using HTML 5 elements such as
<main>and others, then your page will inherit some landmarks automagically. However it can be really helpful to label them (especially if there's more than one landmark of the same type on a page, such as a separate site-wide and page-local
<nav>). The W3C documentation has all the details, but essentially you would use either the
Rule of thumb: If you've more than one landmark of the same type, then be sure to label them, so their purpose is clear.
You can build and run the current code locally as follows.
Clone the Landmarks repository on GitHub to your computer.
Ensure you have all the required build tools with
npm install(you will need Node.js).
Run the tests and build script to create versions of the extension for all browsers with
npm run build:all.
The built versions of the extension are placed in
build/<browser>/directories and ZIP files for each will be created in the root of the checked-out repository.
To load and use the extension locally in your browser...
- Firefox: either:
- use Mozilla's instructions on temporarily loading extensions from disk, or
- if you have
npm run start:firefoxto open Firefox with Landmarks loaded. It will keep itself up-to-date when you re-build.
- Chrome: follow Google's instructions on loading the extension.
- Opera: refer to Testing and Debugging.
- Edge: refer to Run your Extension locally in your browser while developing it (side-loading).
- Firefox: either:
Some further info on the test/build process:
Automated tests are run as a pre-requisite part of the build process; you can also run them with
You can remove the
build/<browser>/directories and ZIP files for all browsers with
npm run clean:builds.
Because the process of rasterising the SVG to variously-sized PNGs is slow, the PNGs are cached so they only need to be re-generated when the SVG changes. They are cached in the
pre-commithook is used to ensure only code that passes tests is committed (it does this by running a build, which, in turn, runs the tests). Husky manages this so that a build is run before you are asked for a commit message.
For advanced use, you can run the build script directly (which bypasses the tests, beware) with
node scripts/build.js --help.
The following pages are incorporated into the automated test suite, but you can also visit them in-browser to try out the extension's UI.
This is a fork of the original landmarks extension written by David Todd at IBM. Thanks to Steve Faulkner for encouraging me to work on this, for feature suggestions, help with the relevant specifications and initial test cases (and again to David Todd for supporting my contributions). Thanks also to The Paciello Group for donating my development time when this was a Firefox-specific extension and during the conversion to the WebExtensions API.