Navigation mislabels <msubsup> children when the superscript is a prime
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 65/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- rust
调研方向
The issue is in the navigation labeling for msubsup with a prime superscript. Look at Rules/Intent/general.yaml for the skip-super rule handling msubsup, and Rules/Languages/en/definitions.yaml for the navigation part definitions. The fix likely involves adjusting the intent inference to preserve indexed-by structure before applying skip-super. Test with the provided MathML example using NVDA and the MathCAT addon to verify navigation roles are correct.
由索引模型根据 Issue 内容生成。
描述
When an <msubsup> has a prime as its superscript, Enhanced and Simple navigation appear to assign the wrong structural roles to its children.
Possibly related to #415, but this seems to involve the special handling for prime/pseudo-script superscripts rather than the ordinary <msubsup> path.
MathML
<math id="0" display="block" xmlns="http://www.w3.org/1998/Math/MathML">
<msubsup id="1">
<mi id="2">x</mi>
<mi id="3">i</mi>
<mo id="4">′</mo>
</msubsup>
</math>
Settings
- Language: English
- Speech style: SimpleSpeak
- Speech verbosity: Medium
- Overview: False
- Navigation verbosity: Verbose
- Auto zoom out: True
Tested through NVDA, with the latest build of MathCAT as an addon.
Observed behaviour
Enhanced and Simple
Both modes behave identically.
-
ZoomIn- land on
id="2" - hear:
"zoom in; in base; x"
- land on
-
MoveNext- land on
id="3" - hear:
"move right; in superscript; i"
- land on
-
MoveNext- land on
id="4" - hear:
"move right; prime"
- land on
The structural labels appear to be shifted. In the source MathML, i is the subscript, not the superscript, and ′ is the superscript.
(Character navigation behaves as expected.)
Expected behaviour
My expectation for Enhanced and Simple is that the semantic structure should preserve the indexed base, similarly to an ordinary <msubsup>, while treating the prime specially rather than as an exponent:
skip-super(indexed-by(x, i), prime)
This would give two semantic parts: the indexed expression x sub i as the base, and the prime as the superscript.
I would therefore expect approximately:
-
ZoomIn- land on the generated semantic node for
x sub i - hear:
"zoom in; in base; x sub i"
- land on the generated semantic node for
-
MoveNext- land on
id="4" - hear:
"move right; in superscript; prime"
- land on
-
MoveNext- reach the end of the expression
Possible cause
Rules/Intent/general.yaml contains a skip-super rule for both msup and msubsup:
name: skip-super
tag: [msup, msubsup]
...
- intent:
name: "skip-super"
...
children: [x: "*"]
For this <msubsup>, that gives the skip-super intent three children:
xi′
However, NavigationParts in Rules/Languages/en/definitions.yaml defines:
"skip-super": "base; superscript",
so skip-super has navigation names for only two children.
This appears consistent with the observed behaviour:
- child 1 (
x) →base - child 2 (
i) →superscript - child 3 (
′) → no navigation part name
The ordinary <msubsup> inference creates an indexed-by intent around the first two children before adding the superscript.
Perhaps the msubsup version of skip-super needs to preserve the indexed-by(base, subscript) structure rather than passing all three children directly to skip-super.
(Disclosure: I asked ChatGPT for help when digging into the possible cause, so these guesses might by all means be wrong.)
- 主要语言
- Rust
- 星标
- 130
- 派生
- 96
- 平均合并
- 1 天 1 小时
- 30 天内合并 PR
- 84
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
daisy/MathCAT 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
discussion
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复
-
discussion translation
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
相似的 Issue
-
Panic on live viewport resize when unstyled elements exist in display: none subtree可能已有人在做 @GoCoder7 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
DioxusLabs/blitz#1488 ·
维护者通常 1 天内回复
-
🏷️ good first issue enhancement
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
S-Needs triage
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
vectordotdev/vrl#2042 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
维护者通常 1 天内回复