Skip to content

Commit

Permalink
[NF] @ROLE for elements Accordion, Content, Breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
k.sidorov committed Aug 6, 2019
1 parent 1046aa5 commit fe03732
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/desktop/src/block-accordion/BlockAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const BlockAccordion: FunctionComponent<
BlockAccordionProps<BlockAccordionItemModel>
> = ({items, indent = 'm', tabIndex = 0, opened, onChange}) => (
<AccordionControl<BlockAccordionItemModel>

items={items}
opened={opened}
onChange={onChange}
Expand All @@ -37,6 +38,8 @@ export const BlockAccordion: FunctionComponent<
{renderProps.items.map((item, index) => (
<Card
key={index}
role="article"
aria-label={typeof item.title === 'string' ? item.title : undefined}
s={
item.hovered || item.focused
? '0 0 16px 0 rgba(0, 0, 0, 0.12)'
Expand Down
2 changes: 2 additions & 0 deletions packages/desktop/src/block-content/BlockContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ const BlockContentIdent: { [indent in NonNullable<BlockContentProps['indent']>]:

export const BlockContent: FC<BlockContentProps> = ({indent = 'm', children}) => (
<Box
role="section"
aria-label="content"
p={BlockContentIdent[indent]}
children={children}
/>
Expand Down
2 changes: 1 addition & 1 deletion packages/desktop/src/breadcrumbs/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const Breadcrumbs: FC<BreadcrumbsProps> = ({children}) => (
<Fragment key={i} >
{i > 0 ? (
<Fragment>
<Box as="span" mx={2} display="inline">
<Box as="span" mx={2} display="inline" role="section">
&#8226;
</Box>
&shy;
Expand Down
2 changes: 2 additions & 0 deletions packages/mobile/src/block-accordion/BlockAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ export const BlockAccordion: FunctionComponent<
{renderProps.items.map((item, index) => (
<Card
key={index}
role="article"
aria-label={typeof item.title === 'string' ? item.title : undefined}
s={
index > 0
? '0 -1px 0 #e6e6e6'
Expand Down
2 changes: 2 additions & 0 deletions packages/mobile/src/block-content/BlockContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ const BlockContentIdent: { [indent in NonNullable<BlockContentProps['indent']>]:

export const BlockContent: FC<BlockContentProps> = ({indent = 'm', children}) => (
<Box
role="section"
aria-label="content"
p={BlockContentIdent[indent]}
children={children}
/>
Expand Down

0 comments on commit fe03732

Please sign in to comment.