If a parent item and its primary attachment are selected, it should
still say "Show File" rather than "Show Files". This adds the
questionably named `Zotero.Items.numDistinctFileAttachmentsForLabel()`
to try to figure out if we're operating on 0, 1, or >1 items.
Follow-up to #4124
Fixes the issue where long press would not open up
context menu in a virtualized table and tab bar because
it was handled in mousedown events that longpress on a
touchscreen does not dispatch.
This behavior is still observed in the scrollable area
of the reader and the note editor.
Addresses: zotero#4094
When item is created manually, title field in itemBox
will be focused instead of the title in the itemPane as before.
If the itemBox is collapsed, it will be opened.
Added 'open' setter to item pane section for brevity
Fixes#4111
- revert debcb9944d since it breaks
drag-drop reordering of tabs
- when reader is being refocused by contextPane, add a small delay
so that the focus settles on the tab before focusing the reader
- also explicitly refocus the reader tab after drag, since then focus
also lands on the tab and finds itself outside of the reader
If the info section is collapsed, do not try to focus and
open the itemType menu as it can lead to an empty dropdown.
Just focus the header title in that case
After clicking on a reader tab, the reader will get focused
but the default mousedown event handler can then shift
focus onto the actual tab. It looks like the focus gets "lost",
and breaks reader keyboard shortcuts so we want to avoid it.
Mainly happens on windows.
Fixes: #4077
- If there are too many tabs opened to fit onto the screen,
the tabs menu can be scrolled
- When tabs menu is opened, scroll to the selected tab
- Use margins instead of padding to that the scrollbar does not
overlap with the cross button
- Make sure that if the tabs menu is long, there will
be a gap between it's top/bottom and the edge of the
screen
- On linux, screen.availTop and screen.availHeight are not always
correct and the menu can go outside of what is supposed to be
the available screen area. Special treatment for those
edge cases
Fluent seems to clear out label/placeholders attributes set directly
(not via .ftl file). So quicksearch placeholder added directly ends
up being emptied out.
This is the cleanest workaround found so far: add the placeholder
as the fluent argument
Fixes: #4073
- do not erase the last recorded tag on blur of the tag selector
- on tab from collectionTree or shift-tab from tag selector input,
try to refocus that last focused tag. If one does not exist,
try to focus the first non-disabled tag.
Fixes: #4008
Locator type dropdown just has aria-label "Locator type".
The locator input is labelled by a hidden label with "Locator input"
string, as well as the locator type. That way both are announced
when it is focused.
Fixes: #4039
- vpat 57: remove tabindex values, set tabindex=0 on all focusable
fields. It allows mozilla to determine the best focus sequence
for keyboard navigation and fixes wrong order where some inputs would
go before the "Ok" and "Cancel" buttons and some - after
- vpat 58: added labels to all inputs to be announced when focused.
Added separate labels for locator menulist and for the locator input so
that the locator type has a proper label. It is also better to have
visible explicit labels when possible
Mostly for brevity, but also:
- "Down Arrow" → "space bar" because down-arrow doesn't open the
citation dialog with VoiceOver enabled -- it starts reading individual
words.
- In some cases (selected/open items and notes), Tab takes you to search
results without your needing to type something first.
Follow-up to #4002, #4004, #4005
Since Word can't handle FSI/PDI.
This affects dragging items into notes and dragging/copying annotations
in the reader. Citations inserted from within the note editor already
didn't include bidi control characters.
Fixes#4013
* tag selector focus edits
- no tabstop on the tag selector scrollable area
- change tag selector's role from default "grid" to "group".
"grid" is not quite correct semantically and leads to
voiceover suggesting irrelevant commands.
- move all keyboard handling logic to tagSelectorList.jsx.
Tabbing through tag selector is now handled in ZoteroPane,
so the only logic left there is arrow navigation
between tags, and there's no reason to not have it
together with the tags list.
- a workaround to deal with focused tags when windowing
kicks in. When a tag is focused, record its index.
Each time tags are re-rendered, if the saved index is not
among rendered tags, refocus it, otherwise, move focus
to the tags list.
Screen readers announce the index of the selected item
from the list of citations in the panel. This removes
the separators from the count, since they are not focusable
and should be skipped.
- edits to zoteroPaneTest.js focus tests to expect the updated focus
sequence: selected tab -> tabs menu -> sync button -> collectionTree
toolbar -> collectionTree -> tags selector -> itemTree toolbar
- updated tags selector keydown handling to explicitly handle all
tab/shift-tab events using moveFocus. It is more readable and explicit
focus handling for all components is required for programmic tab/shiftTab
events dispatched in tests to actually move focus
Fixes: #3975