daisy / daisy/MathCAT

New version of rule for <munder>

Open Beginner friendly
#613 1 comment 0 reactions 0 assignees View on GitHub
discussion rules
Dominant language
Rust
Stars
114
Forks
85
Avg merge
1d 11h
Merged PRs (30d)
42

Description

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

```

```
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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in default.yaml at the existing munder speaking rule and compare it with the Swedish rule described in the issue. Use the nested MathML example to check that speech is less verbose while the brace remains available during navigation; done means the English rule provides the proposed equivalent behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
xml, yaml
Domain
accessibility
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.