From 559ad827378f5fcc8e6bd98a2dc6ef8c8da1cf1c Mon Sep 17 00:00:00 2001 From: Guy Willis Date: Wed, 5 Jun 2024 12:09:36 +0100 Subject: [PATCH] Include explicitly set ariaLevel --- js/a11y.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/a11y.js b/js/a11y.js index 53e70c0b..145705ee 100644 --- a/js/a11y.js +++ b/js/a11y.js @@ -227,8 +227,8 @@ class A11y extends Backbone.Controller { const nextModel = data.findById(id)?.findAncestor(relativeDescriptor.type?.toLowerCase()) ?? data.findById(id); const nextModelId = nextModel?.get('_id') ?? id; // check overrides, check title existence, adjust offset accordingly - const hasNextTitle = Boolean(nextModel.get('displayTitle')); let nextModelOverride = nextModel.get('_ariaLevel'); + const hasNextTitle = Boolean(nextModel.get('displayTitle')) || Boolean(nextModelOverride); // Fix for authoring tool schema _ariaLevel = 0 default if (nextModelOverride === 0) nextModelOverride = null; const accumulatedOffset = offset + (hasNextTitle ? relativeDescriptor.offset : 0);