Expand embedded objects in braille document lines
Structural navigation to a heading whose native text is a single embedded-object placeholder for its child link showed only that placeholder in braille while speech used the expanded title. Braille line reads now expand embedded objects like speech capture, preserving RawText and native offsets; expanded lines carry no cell routes or native selection/attribute dots and only a line-start cursor. Frame assembly strips any remaining placeholders and falls back to displayed text so a placeholder never reaches the display. Regression tests cover placeholder-only, mixed, expanded, assembled, and empty headings plus native linked-heading and Firefox mixed-line braille. Maintainer confirms physical braille and speech agree on YouTube headings.
This commit is contained in:
1 parent
60f7f7a2e9
commit
8ce5e5cdad
7 files changed
+245
-21
No files matched your search
@@ -22,12 +22,17 @@ func (unit DocumentCaretUnit) Valid() bool {
|
||||
}
|
||||
|
||||
type DocumentCaretText struct {
|
||||
TextAttributeRuns []TextAttributeRun
|
||||
Start int
|
||||
End int
|
||||
Text string
|
||||
RawText string
|
||||
Misspelled bool
|
||||
TextAttributeRuns []TextAttributeRun
|
||||
Start int
|
||||
End int
|
||||
Text string
|
||||
RawText string
|
||||
Misspelled bool
|
||||
// Expanded reports that embedded-object placeholders in Text were
|
||||
// replaced by their descendant text. Start, End, selections, attribute
|
||||
// runs, and RawText still describe the unexpanded native line, so
|
||||
// native offsets no longer map one-to-one into Text.
|
||||
Expanded bool
|
||||
CharacterCount int
|
||||
SelectionStart, SelectionEnd int
|
||||
// Bounds describe this native line, including offscreen document text.
|
||||
|
||||
Reference in new issue
Block a user