Repository navigation
Commit b55dcbf
authored
* fix(ui): a screen reader reads a suggestion list's highlighted entry, and Page keys scroll its help (#2619)
A box's suggestion list kept the focus on the box and gave its rows no description, so a screen
reader heard nothing as the highlight moved. While a list is open, the highlighted row is now
the box's active descendant (the button's, for the Functions and Variables menus), which
AccessKit reads as the focus on every platform, and every row says what its help says: one
description per kind of item, shared by the menus and the box's list, worked out once per list.
Page Up and Page Down scroll a help longer than its box while its list is open.
* fix(ui): a Page key pressed as a list closes doesn't scroll the next list's help (#2619)
`keys` counted a Page key before it knew the list stayed open, and `show` kept it when it drew no
list, so the next list opened a page down. A page is now taken only while the list stays open,
and `show` hands it to the list only once it draws one: any frame without a list drops it.
The "head, then its detail on a line of its own" a row says to a screen reader is one function,
`completion::spoken`, for the Script pane's and the expression boxes' rows.
* fix(ui): a Page key waits only for the list it was pressed for (#2619)
A page waiting for a help that changed that frame outlived its list when a click closed it, and
a list with no help never took one, so the next list's help could open a page down. `show` now
hands a pending page back only to the same list, still open, with a help, and drops it when a
click closes the list.
Also: `HashMap` imported in `completion.rs`, `exprcomplete`'s per-item `spoken` renamed
`spoken_item` (apart from `completion::spoken`), and a field's alias moved rather than cloned.
* perf(ui): a list's row descriptions are shared with each copy of the box's state, and go when it closes (#2619)
A box's state is cloned on every load, several times a frame in the Script pane, and the
descriptions cache went with it: with a screen reader on, some 600 strings copied each frame,
still after the list closed. The cache is now an `Arc`: a copy of the state shares it, and a
frame that works out a row copies it at most once. It is dropped when the list closes.
* test(ui): the Page keys test checks that pages add up and reach the help's end (#2619)
`page_keys_scroll_the_help` now checks that a second Page Down goes a page further than the
first, and that after them the help's last line is inside the popup. `List::keys`'s doc names
the Page keys.
* fix(ui): a row says a field's new type, and Page Down pages through the part of the help that shows (#2619)
An expression offer named its fields only, so with a field's type or alias changed under an open
list the offer stayed the same and its rows kept saying the old one. The offer now carries the
fields it was worked out over (`fields_key`: name, type, alias), which the box's memo keys on
too: changed metadata is another offer, and the list's cached descriptions go with the old one.
The help scrolled in its box's full height though a short window's popup may cut the box off, so
a page could pass lines never shown and the help's end stay out of view. It now scrolls in the
part of its box that shows.
* fix(ui): a page is what of the help shows, whichever side the popup cuts (#2619)
The help's view in its box is one function, `help_view`: its scroll area runs from the box's top
to the shown part's bottom, and a page is the shown part less a line, also when the popup is
scrolled down and the box's top is out of view. Escape's dismissal is documented as lasting until
what's typed, or what is offered, changes.
* test(ui): the Page test bounds a page by the help's view, not the popup's frame (#2619)
And help_view's doc says what a page does with less than a line shown: it moves a line.
1 parent 9380156 commit b55dcbf
4 files changed
Lines changed: 561 additions & 31 deletions
0 commit comments