Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
0173b8d
CPFED-4017:
kelsS Feb 9, 2021
a8d67c1
CPFED-4017:
kelsS Feb 17, 2021
825f167
CPFED-4017
kelsS Feb 24, 2021
569e1f5
CPFED-4017:
kelsS Feb 24, 2021
5e08384
Branch was auto-updated with the latest.
github-actions[bot] Feb 24, 2021
f92ea3f
Branch was auto-updated with the latest.
github-actions[bot] Mar 1, 2021
d35fe2d
Branch was auto-updated with the latest.
github-actions[bot] Mar 1, 2021
a6ce04a
CPFED-4017:
kelsS Mar 2, 2021
add1fd8
CPFED-4017: added more updates based on feedback and added note to fi…
kelsS Mar 2, 2021
3c188ff
Branch was auto-updated with the latest.
github-actions[bot] Mar 2, 2021
4670400
CPFED-4017:
kelsS Mar 3, 2021
2f694f9
CPFED-4017:
kelsS Mar 10, 2021
0aa6d32
CPFED-4017:
kelsS Mar 10, 2021
f407fae
CPFED-4017: continued working on fixing bug
kelsS Mar 16, 2021
4ef656e
CPFED-4017: commented out code to see if it was causing the build bug
kelsS Mar 17, 2021
eb6f436
CPFED-4017: removed accidental browsersync import that was caused by …
kelsS Mar 17, 2021
f4a3e18
Branch was auto-updated with the latest.
github-actions[bot] Mar 17, 2021
4576751
Branch was auto-updated with the latest.
github-actions[bot] Mar 17, 2021
05f2ff7
CPFED-4017: continued workin on tab order bug
kelsS Mar 17, 2021
a53d50b
Merge branch 'CPFED-4017-based-off-master' of github.com:patternfly/p…
kelsS Mar 17, 2021
1b5e55d
Branch was auto-updated with the latest.
github-actions[bot] Mar 18, 2021
d653f8f
Branch was auto-updated with the latest.
github-actions[bot] Mar 18, 2021
6193d5d
Branch was auto-updated with the latest.
github-actions[bot] Mar 18, 2021
9b9bc74
CPFED-4017: continued workin on tab order bug
kelsS Mar 19, 2021
b3e181a
CPFED-4017: continued workin on tab order bug
kelsS Mar 22, 2021
0ca0ef0
CPFED-4017: updated to use consistent-height attr on top one, moved f…
kelsS Mar 23, 2021
4acd24e
CPFED-4017: updated to use consistent-height attr
kelsS Mar 23, 2021
ffe01d6
Branch was auto-updated with the latest.
github-actions[bot] Mar 24, 2021
66210ef
CPFED-4017: added focus style class feature
kelsS Mar 25, 2021
6c42636
Merge branch 'CPFED-4017-based-off-master' of github.com:patternfly/p…
kelsS Mar 25, 2021
6096da2
CPFED-4017: added focus indicator readme info, removed lightdom style…
kelsS Mar 25, 2021
d2660e7
Branch was auto-updated with the latest.
github-actions[bot] Mar 26, 2021
9a2b467
Merge branch 'master' into CPFED-4017-based-off-master
castastrophe Mar 30, 2021
38c227f
Branch was auto-updated with the latest.
github-actions[bot] Mar 30, 2021
b6c6c88
Branch was auto-updated with the latest.
github-actions[bot] Mar 30, 2021
0fc74d9
Branch was auto-updated with the latest.
github-actions[bot] Apr 13, 2021
d3b2f69
Branch was auto-updated with the latest.
github-actions[bot] Apr 14, 2021
11a827a
Branch was auto-updated with the latest.
github-actions[bot] Apr 14, 2021
e03f50b
Branch was auto-updated with the latest.
github-actions[bot] Apr 14, 2021
dbd3df0
Branch was auto-updated with the latest.
github-actions[bot] Apr 14, 2021
9f21150
Branch was auto-updated with the latest.
github-actions[bot] Apr 14, 2021
edab677
Branch was auto-updated with the latest.
github-actions[bot] Apr 14, 2021
d0e4bc5
Branch was auto-updated with the latest.
github-actions[bot] Apr 15, 2021
6165b7b
Branch was auto-updated with the latest.
github-actions[bot] Apr 15, 2021
1e285a4
Branch was auto-updated with the latest.
github-actions[bot] Apr 15, 2021
ed61c34
Branch was auto-updated with the latest.
github-actions[bot] Apr 15, 2021
afcee1f
Branch was auto-updated with the latest.
github-actions[bot] Apr 15, 2021
db68a06
Branch was auto-updated with the latest.
github-actions[bot] Apr 16, 2021
7817dfd
Branch was auto-updated with the latest.
github-actions[bot] Apr 19, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion elements/pfe-primary-detail/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# PatternFly Element | Primary detail element


## Usage

A primary-detail layout is an interface that shows a list of items and the corresponding details of the selected item.

This component is an implementation of one of the "Primary detail simple list in card" from [Patternfly React](https://www.patternfly.org/v4/demos/primary-detail), more layouts may be implemented later.
Expand Down Expand Up @@ -56,8 +56,30 @@ This component is an implementation of one of the "Primary detail simple list in
```

### Accessibility

The default markup should have semantic markup if the component can't load, once it loads the component the appropriate tab interactions and appropriate markup for assistive tech is handled for you.

#### Focus Indicator Styles

The component requires visible focus indicator styles for focusable elements (ie.`links`, `buttons`, `[tabindex="0"]`) in order to meet [**WCAG 2.0/2.1 AA compliance**](https://www.w3.org/WAI/WCAG21/quickref/#focus-visible). Below is a good example of styles to use for the focus indicator, these styles match the focus indicator of `pfe-navigation`. The `padding` style is to increase the clickable area of links in order to help users have a better experience when trying to click the links, this also helps users with limited mobility.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though great information, since this is now being managed by the component, I don't think we need to ask developers to add any styles anymore. I'd like to avoid requiring developers to write any custom styles in general so that we maintain a low-effort for implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is for the slotted content, we only address the nav part of this component, not what's in the pane. I think it's good to point out that just using our components doesn't get a site an A+ on a11y.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems like great global advice that is not specific to this component then; would you like to find a good place to add it here?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It also sounds like a place where pfe-base could offer assistance - is there anything missing in pfe-base styles to meet standards? If so, I'd like to get it included because ideally, you can get everything you need from the project and you have the option to write custom styles if you want to.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds great! I think having a reminder that pane styles need to be accessible and a link to centralized docs would be 💯

@kelsS if you want to take a crack at pfe-base I'd like to do it as a separate ticket/PR/effort

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kelsS If you would like, I have a PR I just opened to add in the broadcasted variable hook to pfe-base.scss. If you find an update we can make to our base class (basically our version of normalize.css but a lot less opinionated), you're welcome to include it in this PR: https://github.com/patternfly/patternfly-elements/pull/1530/files

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The readme for pfe-styles is a great place to store notes on making your light DOM styles accessible and we can migrate these notes to the main documentation site after the migration.


```html
pfe-primary-detail .focus-styles:focus,
pfe-primary-detail .focus-styles:hover {
outline: 1px dashed #000;
outline-width: 2px;
}

pfe-primary-detail ul.focus-styles:hover,
pfe-primary-detail :not(pfe-cta).focus-styles:hover {
outline: 0;
}

pfe-primary-detail a.focus-styles {
padding: 8px;
}
```

## Slots

For this component to work, there should be an equal number of `details-nav` and `details` slotted elements.
Expand Down
67 changes: 66 additions & 1 deletion elements/pfe-primary-detail/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,80 @@
.ansible-styles .pfe-primary-detail__toggle--active {
font-weight: bold;
}

pfe-primary-detail .focus-styles:focus,
pfe-primary-detail .focus-styles:hover {
outline: 1px dashed #000;
outline-width: 2px;
}

pfe-primary-detail ul.focus-styles:hover,
pfe-primary-detail :not(pfe-cta).focus-styles:hover {
outline: 0;
}

pfe-primary-detail a.focus-styles {
padding: 8px;
}
</style>

</head>
<body unresolved>
<h1><code>pfe-primary-detail</code></h1>

<h2>Default styles with Focus Indicator styles </h2>
<pfe-primary-detail consistent-height>
<h3 slot="details-nav--header" style="font-size: inherit; margin: 0 0 0.5em; padding: 9px 0.75em 0.75em;">
<a href="#">
Integrations
</a>
</h3>
<h3 slot="details-nav">Infrastructure and Management</h3>
<ul slot="details">
<li><a href="#nowhere">Lorum ipsum dolor sit amet</a></li>
<li><a href="#nowhere">Aliquam tincidunt mauris eu risus</a></li>
<li><a href="#nowhere">Morbi in sem quis dui placerat ornare</a></li>
<li><a href="#nowhere">Praesent dapibus, neque id cursus faucibus</a></li>
<li><a href="#nowhere">Pellentesque fermentum dolor</a></li>
</ul>

<h3 slot="details-nav">Cloud Computing</h3>
<ul slot="details">
<li><a href="#nowhere">Morbi in sem quis dui placerat ornare</a></li>
<li><a href="#nowhere">Praesent dapibus, neque id cursus faucibus</a></li>
<li><a href="#nowhere">Pellentesque fermentum dolor</a></li>
<li><a href="#nowhere">Lorum ipsum dolor sit amet</a></li>
<li><a href="#nowhere">Aliquam tincidunt mauris eu risus</a></li>
<li><a href="#nowhere">Morbi in sem quis dui placerat ornare</a></li>
<li><a href="#nowhere">Praesent dapibus, neque id cursus faucibus</a></li>
<li><a href="#nowhere">Pellentesque fermentum dolor</a></li>
<li><a href="#nowhere">Lorum ipsum dolor sit amet</a></li>
<li><a href="#nowhere">Aliquam tincidunt mauris eu risus</a></li>
<li><a href="#nowhere">Morbi in sem quis dui placerat ornare</a></li>
<li><a href="#nowhere">Praesent dapibus, neque id cursus faucibus</a></li>
<li><a href="#nowhere">Pellentesque fermentum dolor</a></li>
</ul>

<h3 slot="details-nav">Storage</h3>
<ul slot="details">
<li><a href="#nowhere">Morbi in sem quis dui placerat ornare</a></li>
<li><a href="#nowhere">Praesent dapibus, neque id cursus faucibus</a></li>
<li><a href="#nowhere">Pellentesque fermentum dolor</a></li>
</ul>

<h3 slot="details-nav">Runtimes</h3>
<ul slot="details">
<li><a href="#nowhere">Pellentesque fermentum dolor</a></li>
<li><a href="#nowhere">Morbi in sem quis dui placerat ornare</a></li>
<li><a href="#nowhere">Aliquam tincidunt mauris eu risus</a></li>
<li><a href="#nowhere">Praesent dapibus, neque id cursus faucibus</a></li>
</ul>
</pfe-primary-detail>

<h2>Default styles with a nav footer</h2>
<pfe-primary-detail>
<pfe-primary-detail consistent-height>
<h3 slot="details-nav">Infrastructure and Management</h3>

<ul slot="details">
<li><a href="#nowhere">Lorum ipsum dolor sit amet</a></li>
<li><a href="#nowhere">Aliquam tincidunt mauris eu risus</a></li>
Expand Down
2 changes: 1 addition & 1 deletion elements/pfe-primary-detail/src/pfe-primary-detail.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<div id="details-nav">
<slot name="details-nav--header"></slot>
<slot name="details-nav"></slot>
<slot name="details-nav--footer"></slot>
</div>
<div id="details-wrapper">
<slot name="details"></slot>
</div>
<slot name="details-nav--footer"></slot>
Loading