This is a partial implementation of Personalization Semantics Content Module 1.0 [Editor's Draft], intended for exploring design/implementation choices in the spec (i.e. this is not a demo of what using personalised content would be like for users). This repo provides two things:
- A demo page that allows you to trigger transformations manually.
- A browser extension that performs all supported transformations on all pages after they're loaded.
- Changes made to the page after load are not yet reflected, but easily could be with the addition of mutation observation.
The demo page can be accessed on the web. This contains examples of how Module 1 is currently specified, plus a couple of test scenarios that we may explore. On the demo page, you need to trigger a button to perform the transformations.
When you clone this repo, it comes with the latest version of the browser extension, which you can run locally, per the Running section below. When running the browser extension, all pages are adapted on load.
You can also follow the steps in the Building section to build the browser extension.
The starting point was the W3C Editor's Draft 14 January 2021; the latest version is available at: https://w3c.github.io/personalization-semantics/content/
Supported so far:
- Some
@action
values. - Some
@destination
values. - Some
@purpose
values.
Also included, for experimentation purposes:
- Some values for a combined
@purpose
attribute that encompasses the current@action
,@destination
and@purpose
attributes. - Some values for a combined
@purpose
attribute that encompasses the current@action
and@destination
and a@meaning
attribute that encompasses the current@purpose
attribute but can be applied to static content too.
The test/
directory contains a series of fixtures, each of which represents a specific attribute and value, so check there for the full list of what's supported.
Note about attribute names: for shorthand purposes, this repo refers to the attributes without the leading data-
prefixes.
You can build and run the current code locally as follows.
-
Clone the 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 via
npm run build
. The latest extension files will be put into thebrowser-extension/
directory. Follow the Running steps below to load and use it.
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
npm test
. -
The
pre-commit
hook 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.
The extension files are kept in the browser-extension/
directory (they're there when you clone the repo, and are updated when you run a build).
- Firefox: either:
- refer to Temporary installation in Firefox, or
- you could use
web-ext
to start the extension in a temporary new profile, if you have it installed.
- Chrome: follow Google's instructions on loading the extension.
- Edge: refer to Sideload an extension.
- Opera: refer to Testing and Debugging.
The specification is owned and developed by the W3C's Personalization Task Force, which is part of the Accessibile Platform Architectures Working Group, both of which I'm a member.
Thanks to TPGi for sponsoring my W3C membership.
If any of this interests you, there are several ways to contribute to the Task Force's work (note: you can contribute via our GitHub repo without joining the Task Force), and your input would be most welcome!
My personal interest in adaptations and personalization for accessibility began with my postgraduate research, most of which was carried out under the Sus-IT project. Example publication: The potential of adaptive interfaces as an accessibility aid for older web users.