The settings
attribute of the Window interface MUST return an instance of the UserSettings interface. The same object must be returned each time.
Description TBD (esp re: privacy and fingerprinting, and prompt access for certain parameters on a per-domain basis, similar to location sharing)
May need an additional "silent fail" parameter when keys are nice-to-have but not important enough to prompt if the user or platform specifies "prompt for access" to a particular key.
An undefined or empty value for the taxonomy parameter indicates the key matches a preference defined in User Settings Keys section of this document. Standard vendor prefixes (ie
, moz
, o
, webkit
) are reserved for the taxonomy parameter, and any additional implementation or external taxonomy identifiers will be defined in a supplemental, informative document.
// example of a preference defined within the IndieUI User Context specification. window.settings.valueForKey('fontSize'); // e.g. '16px' window.settings.valueForKey('subtitles'); // e.g. returns true if the user wants to see subtitles or captions by default // example of an vendor-proposed preference, intended for standardization. window.settings.valueForKey('someVendorSpecificPreference', 'vendor');
The different settings key groupings are intended to allow individual privacy restrictions for each group. We're still working on the best way to spec those privacy restrictions.
Current thinking is that General Settings will not be restricted (by default) from the requesting page. Values of these settings are expected to change often, and would therefore be of little value for any purpose but the intended use.
I am still hoping we'll come up with a better name than point-of-regard.
This one may indicate too much about AT to remain in the general settings.
true
in most browsers.Type settings will not be restricted (by default) from the requesting page, primarily because a site can figure out all of this information using some creative CSS and JavaScript. These keys are therefore primarily intended as convenience accessors so that web authors can more easily provide adaptive interfaces that work well for all users.
TBD: Settings in this section will be subject to domain-specific privacy policy limiting initial access and prompting the user. TBD whether these keys may be accessed only on a user triggered event, as opposed to onload for example.
I am concerned that this one will be confused with the general 'invertColors' setting.
TBD: Settings in this section will be subject to domain-specific privacy policy limiting initial access and prompting the user. TBD whether these keys may be accessed only on a user triggered event, as opposed to onload for example.
sdh
, cc
, or standard
.
This key is necessary to indicate a preference for subtitles for the deaf and hard of hearing (SDH) over standard spoken-language-only subtitles, but the preference for closed-captions (CC) versus SDH may not be necessary. SDH appears to be generally preferred over CC when available, and a preference for SDH could indicate an implicit preference for CC over standard when CC is available but SDH is not.
There is some concern within the working group regarding this preference because no known operating system or user agent currently includes a way for a user to set this preference. The IndieUI working group is actively seeking comment on the perceived necessity or feasibility of this preference. It may be that this is already covered by WCAG 2.0 SC 1.2.1 which indicates sites should offer transcripts when available.
Do we need a language order preference for type of sign? ASL, etc? Worried this feature will be at-risk due to lack of available signed alternatives.
TBD: Settings in this section will be subject to domain-specific privacy policy limiting initial access and prompting the user. TBD whether these keys may be accessed only on a user triggered event, as opposed to onload for example.
true
if a screen reader is running, or false
otherwise. User agents MAY return a null value if the user has chosen to disallow sharing screen reader information with the requesting domain."Apple VoiceOver"
. User agents MAY return a null value if the user has chosen to disallow sharing screen reader information with the requesting domain.4.0 (220.2)
". User agents MAY return a null value if the user has chosen to disallow sharing screen reader information with the requesting domain.Most of this section is out-of-date. Please don't put too much effort into change requests yet.
In certain cases, it is beneficial for web authors to be aware of the assistive technology in use. This section defines a collection of attributes that can be used to determine, from script, the kind of assistive technology in use, in order to be aware of considerations for a particular assistive technology, including the need to support the UI Change Request Events or Accessibility Events defined in previous sections. Web authors should always limit client detection to detecting known versions. Web authors should always assume future versions and unknown versions to be fully compliant.
The accessibility
attribute of the Navigator interface must return an instance of the Accessibility interface, which represents the identity and state of the assistive technology, and allows web pages to optionally notify assistive technology of certain interface events that cannot be indicated through declarative markup such as WAI-ARIA roles, states, and properties.
interface Accessibility {
readonly attribute InterfaceObject accessibility; // Editorial Note: Is it necessary to define this attribute in the IDL?
// objects implementing the Accessibility interface also implement the ScreenReader and AccessibilityNotifications interfaces
};
Accessibility implements AccessibilityNotifications;
Accessibility implements ScreenReader;
Accessibility implements Magnifier;
Accessibility implements Speech;
[Supplemental, NoInterfaceObject]
interface AccessibilityNotifications {
const unsigned short screenChanged = 1;
const unsigned short elementChanged = 2;
void postNotification(required String notification, optional HTMLElement element);
};
window.accessibility.postNotification()
Returns void. Allows the web author to send a required or supplemental notification, usually to inform the assistive technology to update its cache of the accessibility tree. For example, web authors might call this method after an animation has completed, allowing a screen reader to update its cursor location, if the focused element was moved.
Note: screenChanged should be fired for full screen DOM-based refreshes. elementChanged is sufficient for significant branch node changes.
The screenreader
attribute of the Accessibility interface must return an instance of the ScreenReader interface:
interface ScreenReader {
readonly attribute InterfaceObject screenreader; // Editorial Note: Is it necessary to define this attribute in the IDL?
// objects implementing the ScreenReader interface also implement the interfaces given below
};
ScreenReader implements ScreenReaderID;
ScreenReader implements ScreenReaderStatus;
[Supplemental, NoInterfaceObject]
interface ScreenReaderID {
readonly attribute DOMString name;
readonly attribute DOMString version;
};
[Supplemental, NoInterfaceObject]
interface ScreenReaderStatus {
readonly attribute boolean active;
};
window.accessibility.screenreader.active
true
if a screen reader is running, or false
otherwise. User agents may return false
if the user has chosen to disallow sharing this information with the requesting domain.window.accessibility.screenreader.name
Apple VoiceOver
". User agents may return an empty string if the user has chosen to disallow sharing this information with the requesting domain.window.accessibility.screenreader.version
4.0 (220.2)
". User agents may return an empty string if the user has chosen to disallow sharing this information with the requesting domain.Note: The authors recommend that user agents adopt a domain-level security policy for the ScreenReader interface that is similar to the security policy for location data or cookies. A user should be able to explicitly disallow sharing of this information altogether, or on a per-domain basis.
The magnifier
attribute of the Accessibility interface must return an instance of the Magnifier interface:
interface Magnifier {
readonly attribute InterfaceObject magnifier; // Editorial Note: Is it necessary to define this attribute in the IDL?
// objects implementing the Magnifier interface also implement the interfaces given below
};
Magnifier implements MagnifierID;
Magnifier implements MagnifierStatus;
Magnifier implements MagnifierNotifications;
[Supplemental, NoInterfaceObject]
interface MagnifierID {
readonly attribute DOMString name;
readonly attribute DOMString version;
};
[Supplemental, NoInterfaceObject]
interface MagnifierStatus {
readonly attribute boolean active;
readonly attribute float zoom;
};
[Supplemental, NoInterfaceObject]
interface MagnifierNotifications {
// Editorial Note: I'm not partial to the method name focusPosition. Any other suggestions?
void focusPosition(
in DOMElement element,
in optional array cursorRect,
in optional array selectionPolygon
);
};
window.accessibility.magnifier.active
true
if a screen magnifier is enabled (even if the current zoom level is 1.0), or false
if a magnifier is not enabled. User agents may return false
if the user has chosen to disallow sharing this information with the requesting domain.window.accessibility.magnifier.name
Apple Universal Access Zoom
". User agents may return an empty string if the user has chosen to disallow sharing this information with the requesting domain.window.accessibility.magnifier.version
4.0 (220.2)
". User agents may return an empty string if the user has chosen to disallow sharing this information with the requesting domain.window.accessibility.magnifier.zoom
1.0
or the current magnification level. User agents may return 1.0
if the user has chosen to disallow sharing this information with the requesting domain.window.accessibility.magnifier.focusPosition ( element, cursorRect, selectionPolygon )
Returns void. Allows the web author to send an explicit notification informing the screen magnifier to update its cache of the cursor location. Web authors should call this method when updating the display or cursor position of custom views.
DOMElement element
canvas
) that has focus.optional array cursorRect
[0,0]
position of focused element. [ x1, y1, x2, y2 ]
optional array selectionPolygon
[0,0]
position of focused element. [ x1, y1, x2, y2, ... xn, yn ]
Editorial Note: It may be better if the optional params are shape objects with a coords array and a type string like 'rect' or 'poly'. That would allow the author to decide if they wanted to provide the extra polygon coords, or just use a simple shape.
Note: The focusPosition()
method would be necessary for screen magnifiers to work with canvas-based web apps like Bespin or the 280 North projects. This method is not necessary for text views managed by the user agent, including contentEditable
views.
The speech
attribute of the Accessibility interface must return an instance of the Speech interface:
interface Speech {
// TBD, placeholder for speech-controlled user agents or assistive technology
// may need speech.synthesis and speech.recognition; each could have name/version/engine, etc.
// potential method: speech.synthesis.speak() to trigger TTS from web app
// potential method: speech.recognition.updateDictionary() to capture correct pronunciation of uncommon or app-specific words
};
It's possible this will not need an AccessibilityEvent interface, as this is more-or-less equivalent to UIEvent at the moment.
The following events are usually initiated by assistive technologies or system , as opposed to mainstream user agents. These events are standard notification events and inherit from UIEvent, not UIRequestEvent.
Probably need a normative author requirement here stating authors MUST NOT update the visible view based on these events, unless the focused element is entirely out of view. Include example of where this is harmful.
We might also need an AT equivalent of document.activeElement
.
The different types of AccessibilityEvents that can occur are:
atfocus
Initiated when the assistive technology cursor or point-of-regard moves to a particular DOM node.
atblur
Initiated when the assistive technology cursor or point-of-regard leaves a particular DOM node.