+
{children}
{contextValue && plotRef.current && (
diff --git a/src/service/display.ts b/src/service/display.ts
index 2443c964..5f2f2b12 100644
--- a/src/service/display.ts
+++ b/src/service/display.ts
@@ -101,40 +101,30 @@ export class DisplayService implements Disposable {
/**
* Adds instruction ARIA labels to the plot element.
- * Restores the plot to a passive image role for screen reader graphics navigation.
*/
private addInstruction(): void {
this.plot.setAttribute(Constant.ARIA_LABEL, this.getInstruction());
this.plot.setAttribute(Constant.TITLE, this.getInstruction());
this.plot.setAttribute(Constant.ROLE, Constant.IMAGE);
- this.plot.removeAttribute(Constant.ARIA_ROLEDESCRIPTION);
this.plot.tabIndex = 0;
}
/**
* Removes or updates instruction ARIA labels when entering interactive mode.
- *
- * Uses {@link Constant.GRAPHICS_DOCUMENT role="graphics-document"} from the
- * WAI-ARIA Graphics Module (https://www.w3.org/TR/graphics-aria-1.0/) to preserve
- * screen reader quick-navigation (e.g. "g" key in NVDA, VO+Cmd+G in VoiceOver)
- * while indicating this is an interactive graphical document.
- *
- * AT compatibility notes (tested roles, not exhaustive):
- * - VoiceOver (macOS/iOS): good support for graphics-document
- * - NVDA + Firefox/Chrome: support varies by version; verify after updates
- * - JAWS + Chrome/Edge: support varies by version; verify after updates
*/
private removeInstruction(): void {
const instruction = this.hasEnteredInteractive ? '' : this.getInstruction(false);
if (instruction) {
this.plot.setAttribute(Constant.ARIA_LABEL, instruction);
+ this.plot.removeAttribute(Constant.TITLE);
+ this.plot.setAttribute(Constant.ROLE, Constant.APPLICATION);
+ this.plot.tabIndex = 0;
} else {
this.plot.removeAttribute(Constant.ARIA_LABEL);
+ this.plot.removeAttribute(Constant.TITLE);
+ this.plot.setAttribute(Constant.ROLE, Constant.APPLICATION);
+ this.plot.tabIndex = 0;
}
- this.plot.removeAttribute(Constant.TITLE);
- this.plot.setAttribute(Constant.ROLE, Constant.GRAPHICS_DOCUMENT);
- this.plot.setAttribute(Constant.ARIA_ROLEDESCRIPTION, Constant.INTERACTIVE_CHART);
- this.plot.tabIndex = 0;
}
/**
@@ -218,8 +208,7 @@ export class DisplayService implements Disposable {
this.plot.removeAttribute(Constant.ARIA_LABEL);
}
- this.plot.setAttribute(Constant.ROLE, Constant.GRAPHICS_DOCUMENT);
- this.plot.setAttribute(Constant.ARIA_ROLEDESCRIPTION, Constant.INTERACTIVE_CHART);
+ this.plot.setAttribute(Constant.ROLE, Constant.APPLICATION);
this.plot.focus();
if (!this.hasEnteredInteractive) {
this.hasEnteredInteractive = true;
diff --git a/src/util/constant.ts b/src/util/constant.ts
index 60e9ff24..82549962 100644
--- a/src/util/constant.ts
+++ b/src/util/constant.ts
@@ -88,12 +88,8 @@ export abstract class Constant {
// Attribute values.
/** DOM insertion position after the element */
static readonly AFTER_END = 'afterend';
- /** ARIA graphics-document role value for interactive SVG charts (WAI-ARIA Graphics Module) */
- static readonly GRAPHICS_DOCUMENT = 'graphics-document';
- /** ARIA roledescription attribute name */
- static readonly ARIA_ROLEDESCRIPTION = 'aria-roledescription';
- /** Custom role description announced by screen readers for interactive charts */
- static readonly INTERACTIVE_CHART = 'interactive chart';
+ /** ARIA application role value */
+ static readonly APPLICATION = 'application';
/** Text string for 'are' with spaces */
static readonly ARE = ' are ';
/** SVG circle element tag name */