-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
KCardGrid part 2: Add KCardGrid with the base layouts + Add selection controls + Final documentation for KCard and KCardGrid + Few KCard bugfixes and improvements #785
Conversation
to have a suitable location for playground sub-components when testing complex scenarios
alongside the existing very small picture to allow for testing in both cases.
to visually separate it from the footer slot.
to allow components that required more space to demonstrate their function in relevant ways, such as grids.
Ensures spaces are rendered as expected no matter of whether some/all/none slots are displayed. Also aligns spaces more closely to designs.
and use constants to define thumbnail width so they can be later referenced instead of hardcoded values..
the content area next to it more intelligently in browsers that support `clamp()` by: - Instead of defining 'width', 'min-width', and 'max-width' separately, `clamp()` is used with the goal to have the actual thumbnail width saved in the single `$thumbnail-width` value. - The `$thumbnail-width` value is then referenced when calculating the remaining space for the content area, ensuring the precise distribution of space. Resolves some issues related to unprecise calculations, most importantly this removes the area of empty space between the thumbnail and content areas in some card's sizes, wasting space that can be used for card's textual content.
Otherwise in some scenarios, such as when there is a large placeholder element and a small thumbnail image, some parts of the placeholder element may be visible behind the image after it has been successfully loaded.
to communicate its function more clearly
to communicate its purpose. The card layout is rather a combination of its orientation and the thumbnail area configuration.
when navigating the list of cards with TAB key. This resolves overwhelming output and aligns the screenreader navigation to the expected experience when on TAB only card titles should be announced (other content is still accessible by navigating with arrows). The main culprit that caused all content of cards being announced was 'tabindex=0' set on <li>. To resolve the problem, an alternative technique that doesn't require this tabindex is used to make the focus ring display around the whole card area.
by screenreaders and add some docs.
This information, with more, is now documented in the main documentaton sections.
Documentation page is better suited for this and it already explains grid layouts in detail.
Thanks a lot @AllanOXDi. I pushed some updates and left couple of clarifying questions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @MisRob!! This is looking great!! Loved how KCard and KCardGrid docs are structured, and code changes looks good to me. I left just a couple of questions/concerns, that Im not sure if falls in the scope of this PR. Thanks!
I've read over the documentation a bit and only noticed a few things:
|
Excellent work @MisRob , I'm so 😍 with the progress here! 👏🏽 🏅 💯 Even though some further attention will be necessary for proper labeling of the interactive elements within the card, this is a very strong and accessible foundation! Keyboard navigation is fluid, without hickups, and with the order we agreed upon, screen reader output is according to the expectations! 🎉
According to the W3C ARIA Authoring Practices Guide, the expected checkbox pattern requires only the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accessibility-wise, this is ready to 🚀! 🙂 🎉
@MisRob - I have read through the documentation and find it comprehensive and well-organized. There may be things that we end up wanting to add or adjust as we start implementing (and I think it would be ideal if some of the engineers who are less familiar with this do some of the refactoring work in 0.18, so we can get a new perspective on the work and documentation and see what additional information is useful for the team. (I haven't done any code review, as it seems as though that's been covered by others, and that Radina has done comprehensive accessibility QA as well) |
on a grid row by not using `flex-basis` that seems to not be as precise as using `width`.
@LianaHarris360 Thank you. (1) Fixed |
Good news @radinamatic, thank you |
Thanks for reading through it @marcellamaki. Yes, it'd be great if cards could be now used by more developers who would give feedback. |
All actionable feedback addressed. I am going to update changelog and open 'beta' -> 'this final version' migration issues for existing Kolibri and Studio cards and then we can merge. |
Description
KCard
bugfixes, visual and public API updatesclamp()
)titleLines
prop totitleMaxLines
layout
prop toorientation
KCardGrid
KCardGrid
with the base layoutsKCard
updates to make screen readers announce only card titles when navigating the grid with TAB keyDocs
KCard
docsKCardGrid
docsDocsSubNav
,DocsToggleButton
,DocsToggleContent
,DocsTable
Also has some minor cleanup.
See details and reasons for changes in commit messages.
References
KCardGrid
base layouts correspond to the (currently) only grid layouts we will use, and designs also demonstrate why grids are based on window breakpoints in contrast to available space in the containing element (however I think that may potentially be a valuable future improvement to be considered)Changelog
Description: Renames
KCard
'stitleLines
prop totitleMaxLines
Products impact: updated API
Addresses: -
Components:
KCard
Breaking: yes
Impacts a11y: no
Guidance: Rename the prop
Description: Renames
KCard
'slayout
prop toorientation
Products impact: updated API
Addresses: -
Components:
KCard
Breaking: yes
Impacts a11y: no
Guidance: Rename the prop
Description: Adds support to
KCard
for selection controls such as checkboxesProducts impact: new API
Addresses: -
Components:
KCard
Breaking: no
Impacts a11y: yes
Guidance: -
Description: Improves spaces display in
KCard
Products impact: visual update
Addresses: -
Components:
KCard
Breaking: no
Impacts a11y: no
Guidance: -
Description: Hides
KCard
placeholder element after the thumbnail image is loadedProducts impact: bugfix
Addresses: Resolves issue when parts of the placeholder element was visible behind a small thumbnail image
Components:
KCard
Breaking: no
Impacts a11y: no
Guidance: -
Description: Updates
KCard
to make screen readers announce only card titles when navigating the grid with TAB keyProducts impact: bugfix
Addresses: Resolves unexpected behavior when overwhelming amounts of information was announced when navigating the card list with TAB
Components:
KCard
Breaking: no
Impacts a11y: no
Guidance: -
Description: Introduces
KCardGrid
(with internal relatedKCard
updates)Products impact: new API
Addresses: KCardGrid MVP and specification #697, KCard: Allow the height of sections to be configured and related improvements #703
Components:
KCardGrid
Breaking: no
Impacts a11y: no
Guidance: -
Description: Adds detailed guidance to
KCard
andKCardGrid
documentation pagesProducts impact: none
Addresses: Add new design pattern documentation page for cards #264, Add more guidance to KCard docs #696
Components:
KCard
,KCardGrid
Breaking: no
Impacts a11y: no
Guidance: -
Description: Adds new documentation components:
DocsSubNav
,DocsToggleButton
,DocsToggleContent
,DocsTable
Products impact: none
Addresses: Helps with organizing larger amounts of guidance on documentation pages
Components: -
Breaking: no
Impacts a11y: no
Guidance: -
Description: Slightly increases the width of the main documentation area
Products impact: none
Addresses: Helps to better demonstrate components requiring more space on documentation pages, such as card grids
Components: -
Breaking: no
Impacts a11y: no
Guidance: -
Steps to test
Read both documentation pages for KCard and KCardGrid
Test live examples on both documentation pages
I can also provide a copy of the playground page with all visual layouts. However now when there's many live examples on documentation pages, for the purpose of review it would make more sense to use them as they offer larger variety regarding card content.
Testing checklist
Reviewer guidance
Comments
useKCardGrid
for advanced grid customization and loading states