Found a few ways in which the Braille problem with browsers could resurface. Fixed now.
This commit is contained in:
1 parent
0a3d946ffa
commit
a47253d697
13 files changed
+292
-23
No files matched your search
@@ -21,11 +21,12 @@ func brailleDocumentFrame(result review.Result, options config.BrailleOptions, c
|
||||
if line == nil && assembled == nil || snapshot.Role == "password text" {
|
||||
frame := brailleFocusFrameWithOptions(snapshot, options, configured...)
|
||||
frame.Routes = nil
|
||||
if snapshot.Role == "link" && snapshot.ExplicitName && strings.TrimSpace(snapshot.Name) != "" && !snapshot.Editable {
|
||||
name := strings.TrimSpace(stripEmbeddedObjects(snapshot.Name))
|
||||
if snapshot.Role == "link" && snapshot.ExplicitName && name != "" && !snapshot.Editable {
|
||||
// Accessible-label review has no native text route.
|
||||
frame.Cursor = min(result.DocumentPosition.Offset, utf8.RuneCountInString(strings.TrimSpace(snapshot.Name)))
|
||||
frame.Cursor = min(result.DocumentPosition.Offset, utf8.RuneCountInString(name))
|
||||
}
|
||||
textLength := utf8.RuneCountInString(snapshot.Name)
|
||||
textLength := utf8.RuneCountInString(name)
|
||||
if textLength == 0 {
|
||||
textLength = utf8.RuneCountInString(snapshot.Text)
|
||||
}
|
||||
@@ -220,7 +221,7 @@ func braille_object_frame(s atspi.Snapshot, options config.BrailleOptions, confi
|
||||
if frame, handled := libreOfficeBrailleFrame(s, options); handled {
|
||||
return frame
|
||||
}
|
||||
name, role := strings.TrimSpace(s.Name), s.ControlRole()
|
||||
name, role := strings.TrimSpace(stripEmbeddedObjects(s.Name)), s.ControlRole()
|
||||
if role == "terminal" || brailleTextRole(role) && s.TextCaretKnown {
|
||||
label := name
|
||||
if role == "terminal" || role == "heading" || role == "static" {
|
||||
|
||||
Reference in new issue
Block a user