From cdfa69088d275c7bd08ab0eef5f9e349a073fae8 Mon Sep 17 00:00:00 2001 From: Eli Luberoff Date: Sun, 2 Feb 2025 21:10:36 -0500 Subject: [PATCH] improve API for tabbability * update value through the config method * change from "tabbable" to "tabindex", to match all of html's capabilities --- docs/Api_Methods.md | 4 ---- docs/Config.md | 7 ++++--- src/mathquill.d.ts | 3 +-- src/publicapi.ts | 9 ++++----- src/services/textarea.ts | 33 ++++++++++++++------------------- test/basic.html | 3 ++- test/demo.html | 8 ++++---- test/unit/aria.test.js | 6 +++--- test/unit/focusBlur.test.js | 20 ++++++++++---------- 9 files changed, 42 insertions(+), 51 deletions(-) diff --git a/docs/Api_Methods.md b/docs/Api_Methods.md index 8b2a99e9e..084afc4d3 100644 --- a/docs/Api_Methods.md +++ b/docs/Api_Methods.md @@ -252,10 +252,6 @@ mathField.typedText('x=-b\\pm \\sqrt b^2 -4ac'); Specify an [ARIA label][`aria-label`] for this field, for screen readers. The actual [`aria-label`] includes this label followed by the math content of the field as speech. Default: `'Math Input'` -## .setTabbable(tabbable) - -Specify whether this field should be in the tab order. - ## .getAriaLabel() Returns the [ARIA label][`aria-label`] for this field, for screen readers. If no ARIA label has been specified, `'Math Input'` is returned. diff --git a/docs/Config.md b/docs/Config.md index ecbb5b4e5..cac50a9d6 100644 --- a/docs/Config.md +++ b/docs/Config.md @@ -124,11 +124,12 @@ You can also specify a speech-friendly representation of the operator name by su `substituteTextarea` is a function that creates a focusable DOM element that is called when setting up a math field. Overwriting this may be useful for hacks like suppressing built-in virtual keyboards. It defaults to `