Announce popup state for buttons and links
This commit is contained in:
1 parent
4c95c9f278
commit
abb4890e8a
3 files changed
+30
No files matched your search
@@ -209,3 +209,20 @@ func TestSliderFocusUsesCurrentValueInsteadOfStaleText(t *testing.T) {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestPopupControlPresentation(t *testing.T) {
|
||||
for _, role := range []string{"button", "push button", "toggle button", "link", "combo box", "text"} {
|
||||
t.Run(role, func(t *testing.T) {
|
||||
plain := atspi.Snapshot{Name: "Options", Role: role}
|
||||
popup := plain
|
||||
popup.HasPopup = true
|
||||
want := FocusText(plain)
|
||||
if role == "button" || role == "push button" || role == "toggle button" || role == "link" {
|
||||
want += ", has popup"
|
||||
}
|
||||
if got := FocusText(popup); got != want {
|
||||
t.Fatalf("popup focus = %q, want %q", got, want)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user