diff --git a/elements/CHANGELOG.md b/elements/CHANGELOG.md index a6cd648a..0d96b741 100644 --- a/elements/CHANGELOG.md +++ b/elements/CHANGELOG.md @@ -13,6 +13,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - `pos-navigation` is now a more complex navigation widget, not just an input field. - It is planned to evolve into an Omnibox for searching and navigating in PodOS Browser. +### Changes + +- [pos-list](../docs/elements/components/pos-list): Added storybook example using CSS grid and table aria roles + ### Fixed - [pos-app-browser](../docs/elements/apps/pos-app-browser): prevent error message flashing up while uri is unset on hard refresh diff --git a/storybook/stories/composition/2_list-composition.stories.mdx b/storybook/stories/composition/2_list-composition.stories.mdx index edcf3164..4adc4906 100644 --- a/storybook/stories/composition/2_list-composition.stories.mdx +++ b/storybook/stories/composition/2_list-composition.stories.mdx @@ -10,7 +10,8 @@ import { Canvas, Meta, Story } from "@storybook/addon-docs/blocks"; ## pos-list composition This is an example of how you can use `` element to list things -related to a resource with a custom display. +related to a resource with a custom display. The `ul` and `li` elements are used +as appropriate semantic HTML elements. @@ -35,3 +36,48 @@ Skills: `} + +## Table example + +The `table`-related HTML elements have strict rules that prevent other elements +such as `pos-list` being used within them. Instead we can make a table using CSS +`grid` rules. The grid needs to be defined within each template as `pos-list` +nests list items within `pos-resource` elements, which use shadow dom. + + + + {({ uri }) => html` + + + Table of skills +
+
Skill
+
URL
+
+ + + +
+ `} +
+