New version of rule for <munder>

未关闭 适合新手
#613 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
72/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
冷清
技术栈
xml, yaml
领域
accessibility

调研方向

从 default.yaml 中现有的 munder 朗读规则开始,将其与 issue 中描述的瑞典语规则进行比较。使用嵌套的 MathML 示例检查朗读是否更简洁,同时在导航过程中仍可使用花括号;当英语规则提供所提议的等效行为时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

discussion rules

In default.yaml there is a rule for speaking <munder>. In cases where there are nested <munder>s, such as the following,

<math display="inline" xmlns="http://www.w3.org/1998/Math/MathML">
          <munder>
            <mrow>
              <munder>
                <mrow>
                  <mn>2</mn>
                  <mo>,</mo>
                  <mn>7</mn>
                  <mo>,</mo>
                  <mn>12</mn>
                  <mo>,</mo>
                  <mn>17</mn>
                  <mo>,</mo>
                  <mo>…</mo>
                  <mo>,</mo>
                  <mn>n</mn>
                  <mo>+</mo>
                  <mn>5</mn>
                </mrow>
                <mo>⏟</mo>
              </munder>
            </mrow>
            <mi mathvariant="normal">N</mi>
          </munder>
        </math>

the speaking is exceedingly verbose. In this case it would read "quantity quantity, 2 comma 7 [...] plus 5, with bottom brace below, with N below".

In Swedish, I have modified this rule so that it says the equivalent of "commented expression, 2 comma 7 [...] plus 5, with comment below, N, end comment". The bottom brace will be spoken only in navigation.

The new Swedish rule looks like this (translated into English here):

- name: default
  tag: munder
  match: "."
  replace:
  - with:
      variables:
      # true if the comment contains ⏟ or ︸ (also if inside mrow or surrounded by whitespace)
      - HasBrace: "contains(normalize-space(string(*[2])), '⏟') or contains(normalize-space(string(*[2])), '︸')"
      replace:
      - test:
          if: "$HasBrace"
          then:
            # The base is always read
            - x: "*[1]"
            - pause: short
            # Read the brace (good for navigation) but no framing phrases
            - x: "*[2]"
          else:
            # Frame phrase in the beginning if the base is not leaf
            - test:
                if: "not(IsNode(*[1], 'leaf'))"
                then: [T: "commented expression"]
            - x: "*[1]"
            - pause: short
            - T: "with comment below"
            - pause: short
            - x: "*[2]"
            - pause: short
            - T: "end comment"

If others agree that this is a better solution, I would suggest substituting the English rule for this.

主要语言
Rust
星标
114
派生
85
平均合并
1 天 16 小时
30 天内合并 PR
42

贡献指南

这个仓库没有索引到贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

daisy/MathCAT 的其他 Issue

查看 daisy/MathCAT 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。