Home > Blockchain >  What is accessibility.AOM.enabled in Firefox about:config and Chrome chrome://flags?
What is accessibility.AOM.enabled in Firefox about:config and Chrome chrome://flags?

Time:12-30

I counldn't find any clear explanation about accessibility.AOM.enabled

I have searched chrome and Firefox websites.

CodePudding user response:

'accessibility.AOM.enabled' is a preference in the Chrome browser that enables or disables the Accessibility Object Model (AOM). When the preference is set to true, the AOM is enabled and accessible to web pages. When it is set to false, the AOM is disabled and not accessible to web pages.

The Accessibility Object Model is a web standard that allows web developers to create web content that is more accessible to users with disabilities. It provides a way for web developers to programmatically modify the accessibility information of a webpage, such as the text labels and descriptions of elements, the focus order, and the relationships between elements. This can make it easier for users with disabilities to navigate and interact with web pages using assistive technologies, such as screen readers or keyboard-only navigation.

You can find the accessibility.AOM.enabled preference in the Chrome browser by going to chrome://flags in the address bar and searching for "Accessibility Object Model". You can then use the dropdown menu to enable or disable the preference.

CodePudding user response:

To add on to @morteza's answer, the AOM (Accessibility Object Model) is a proposed structure, see https://wicg.github.io/aom/spec/.

It's similar to the DOM (document object model) in that it will allow to you access objects and change properties on them. The AOM will give you direct access to the accessibility tree.

Currently, you have to use setAttribute to change the value of ARIA attributes, for example:

acc1 = document.getElementById('accordionHeader1');
acc1.setAttribute("aria-expanded","true");

With the AOM, you'd be able to write more "object oriented" looking code:

acc1 = document.getElementById('accordionHeader1');
acc1.ariaExpanded = "true";

The reason you have to turn a flag on in Chrome/Firefox in order to access the AOM is because the AOM is still a work in progress/experimental.

I wouldn't write any production code that depends on the AOM. For now, you have to add/set/change ARIA attributes using setAttribute() and removeAttribute().

  • Related