Name Steam popups and tabs, skip empty editor placeholder

Steam popup documents spoke their internal names (QuickAccess_uid2);
they now say "Quick Access" and "Main Menu". The unnamed Quick Access
tab is named Friends from its quickaccess_tab id. An empty rich editor
whose text is only an object replacement character (ChatGPT's message
box) no longer speaks that character on focus.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Storm DragonandClaude Opus 5.5 committed 2026-12-01 02:52:44 -05:00
1 parent 7b4fca03bf
commit d47a0c0d5d
5 files changed
+73 -1

No files matched your search

+3 -1
View File
@@ -158,7 +158,9 @@ func FocusSpeechWithOptions(snapshot atspi.Snapshot, options Options) Speech {
if options.SpeakDescription {
fields = append(fields, snapshot.Description)
}
if snapshot.Role != "spin button" {
// An empty rich editor can expose only an embedded paragraph's object
// replacement character (ChatGPT's message box). It is not content.
if snapshot.Role != "spin button" && strings.TrimSpace(strings.ReplaceAll(snapshot.Text, "\ufffc", "")) != "" {
fields = append(fields, snapshot.Text)
}
if snapshot.Autocomplete && snapshot.SelectionEnd > snapshot.SelectionStart {
@@ -292,3 +292,14 @@ func TestDocumentLoadAnnouncesOnlyTitle(t *testing.T) {
}
}
}
func TestFocusTextOmitsEmbeddedObjectPlaceholder(t *testing.T) {
entry := atspi.Snapshot{Name: "Ask ChatGPT", Role: "entry", Editable: true, Text: ""}
if got := FocusTextWithOptions(entry, DefaultOptions()); strings.ContainsRune(got, '') || got != FocusTextWithOptions(atspi.Snapshot{Name: "Ask ChatGPT", Role: "entry", Editable: true}, DefaultOptions()) {
t.Fatalf("empty rich editor focus = %q", got)
}
entry.Text = "Hello"
if got := FocusTextWithOptions(entry, DefaultOptions()); !strings.Contains(got, "Hello") {
t.Fatalf("editor with text lost its content: %q", got)
}
}