Closed ggeisler closed 3 years ago
Error in Arabic view documented https://github.com/sul-dlss/dlme/issues/1172. Leaving this in QA/Stanford until https://github.com/sul-dlss/dlme/issues/1172 is complete.
@asmaaalkuwari we need translations for
@jacobthill Items: عنصر/عناصر View all: مشاهدة الكل
Related to #1066 (preliminary discussion) and #1145 (widget for this feature).
The general idea is to present the published browse categories associated with a published browse group in a row on the page. On desktop viewports, three browse categories are shown at one time, with previous/next controls available for scrolling, where scrolling is done by groups of three (except at either end of the list, if there are less than three left), rather than one at a time as is done in some similar components.
I leave it to the developers to decide on the best component/library to base this on, but I’ll note that:
A & B: Heading and associated link
Browse group heading:
H2
withfont-size: 1.875rem;
Both heading and link are
font-weight: normal;
and default font-color (probably don’t need to explicitly set those)View all
link is$font-size-base
(1.25rem)View all
link styled withtext-decoration: underline;
for all states (we don’t use underline for links in the normal state elsewhere on the site right now, but I think it’s really important that we make these clear links to standout from the group title text)There should be ~20px horizontal padding between the group heading and View all link
C: Previous/Next buttons
Note that by including both previous and next buttons I’m suggesting that we not have the navigation of the categories wrap. When you get to the last set of categories in a group, the next button is disabled and you have to use the previous button to go back and see the other sets of categories in the group.
XS
andSM
viewports as discussed later)1rem
between iconsMD
and smaller viewports (looks big but that’s the recommended minimum size for primary controls when touch is involved, so let’s try it?)#707070
(suggest adding new variable$color-black-lighter: #707070
;)$color-gray-medium
(#ccc)Vertical spacing between rows
3rem
between rows (split between1.5rem
top and bottom, I think, unless this doesn’t seem to work very well. I can do some fine-tuning of spacing later, if necessary)D: Responsive adjustments
The design assumes the browse category blocks will use the exact same sizing and other styling, including the text labels on the blocks, as the browse categories/pages widgets currently do. Because of that I won’t include any sizing details here other than to note that the
XS
viewport uses one size (the largest),MD
andLG
use another,XL
a third size.The
SM
viewport uses a fourth size, which is pretty small. This could be problematic in DLME because we’re using the extra caption line for at least the time period categories and I’m doubtful that all of the time period labels will fit on theSM
sized block. So at least for a first-pass, perhaps we should diverge from the browse category/pages widget styling for theSM
viewport only, and go with the same styling there as theXS
styling.Longer-term, or if it is feasible to do in the first-pass at this, I think the
SM
viewport might work well with a 2-up version of the horizontally-scrolling widget. (I can mock that up later to be sure and suggest exact sizing details.)XS and SM viewport deviations
Although most of the sizing and styling can follow the pattern of the browse categories/pages widgets, there are a few deviations for the
XS
andSM
viewports we need to make:XS
andSM
viewports, go with a 1-up display (atSM
the current browse categories widget uses a 3-up display); to see the other blocks in that group the user needs to use the previous/next controls.XS
andSM
viewports, make the “View all” link right-aligned and move the previous/next buttons to a row below the group title/View all link, and center the buttonsXS viewport example
Keyboard/screenreader concerns
Below is a preliminary suggestion for dealing with accessibility concerns. I don’t want to delay this ticket while I take the time to understand all the relevant details and possibilities, but I can work with @camillevilla (to leverage her a11y knowledge) and/or whoever else works on this to resolve details around accessibility. For now:
The strategy above basically avoids a potentially confusing and tedious keyboard navigation sequence but does require the keyboard user to do more navigation if they choose to enter a browse group row. But they also have an easy way to bypass the browse group row entirely.
I think a similar strategy will work for the screenreader user; but that user will already have the headings to use to move over a given browse group row. So for both keyboard and screenreaders, I think the basic strategy is to hide the previous and next buttons and present all categories in a given browse group as a full set. I know there are more details to work out, but I hope that's enough to get started on this ticket.
Here’s a blog post that has some rationale for this strategy: https://medium.com/@lsnrae/if-you-must-use-a-carousel-make-it-accessible-977afd0173f4
RTL concerns
I can’t think of any special RTL considerations. It seems like everything should just flip as usual with RTL, such that the next arrow will point left and the blocks will slide from RTL instead of LTR.