diff --git a/packages/documentation-framework/components/autoLinkHeader/autoLinkHeader.js b/packages/documentation-framework/components/autoLinkHeader/autoLinkHeader.js index b5a9948d39..759a15301a 100644 --- a/packages/documentation-framework/components/autoLinkHeader/autoLinkHeader.js +++ b/packages/documentation-framework/components/autoLinkHeader/autoLinkHeader.js @@ -1,8 +1,9 @@ import React from 'react'; -import { Title, Flex, FlexItem } from '@patternfly/react-core'; +import { Title, Flex, FlexItem, Text } from '@patternfly/react-core'; import LinkIcon from '@patternfly/react-icons/dist/esm/icons/link-icon'; import { Link } from '../link/link'; import { slugger } from '../../helpers/slugger'; +import { css } from '@patternfly/react-styles'; // "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" const sizes = { @@ -31,7 +32,7 @@ export const AutoLinkHeader = ({ id={slug} size={sizes[size]} headingLevel={headingLevel || size} - className={`ws-heading ${className}`} + className={css('ws-heading', className)} tabIndex={-1} > diff --git a/packages/documentation-framework/layouts/sideNavLayout/sideNavLayout.js b/packages/documentation-framework/layouts/sideNavLayout/sideNavLayout.js index 1cbeb04ab7..631c080f1e 100644 --- a/packages/documentation-framework/layouts/sideNavLayout/sideNavLayout.js +++ b/packages/documentation-framework/layouts/sideNavLayout/sideNavLayout.js @@ -81,7 +81,7 @@ const HeaderTools = ({ // useEffect(() => { // // reattach algolia to input each time search is expanded // if (hasSearch && isSearchExpanded) { - // attachDocSearch(algolia, '.ws-global-search .pf-v5-c-text-input-group__text-input', 1000); + // attachDocSearch(algolia, '.ws-global-search .pf-v6-c-text-input-group__text-input', 1000); // } // }, [isSearchExpanded]) @@ -225,7 +225,7 @@ export function attachDocSearch(algolia, inputSelector, timeout) { inputSelector, autocompleteOptions: { hint: false, - appendTo: `.ws-global-search .pf-v5-c-text-input-group`, + appendTo: `.ws-global-search .pf-v6-c-text-input-group`, }, debug: process.env.NODE_ENV !== 'production', ...algolia diff --git a/packages/documentation-framework/scripts/md/styled-tags.js b/packages/documentation-framework/scripts/md/styled-tags.js index 62dd2210b6..2730bb3866 100644 --- a/packages/documentation-framework/scripts/md/styled-tags.js +++ b/packages/documentation-framework/scripts/md/styled-tags.js @@ -1,10 +1,8 @@ const visit = require('unist-util-visit'); -const styledMdTags = [ +const contentStyledMdTags = [ 'p', 'ul', - 'ul', - 'ul', 'ol', 'li', 'dl', @@ -12,35 +10,44 @@ const styledMdTags = [ 'small', 'hr', 'dt', + 'dd' +]; + +const styledMdTags = [ + ...contentStyledMdTags, 'code', 'table', 'img' -]; +] function styledTags() { return tree => { visit(tree, 'element', node => { + if (contentStyledMdTags.includes(node.tagName)) { + node.properties.className += `pf-v6-c-content--${node.tagName}`; + } + if (styledMdTags.includes(node.tagName)) { node.properties.className = node.properties.className || ''; node.properties.className += node.properties.className ? ' ' : ''; - node.properties.className += `ws-${node.tagName}`; - // Match pf-v5-c-table implementation + node.properties.className += `ws-${node.tagName} `; + // Match pf-v6-c-table implementation // https://pf4.patternfly.org/components/table/html/basic-table/ if (node.tagName === 'table') { - node.properties.className += ' pf-v5-c-table pf-m-grid-lg pf-m-compact'; + node.properties.className += ' pf-v6-c-table pf-m-grid-lg pf-m-compact'; node.properties.role = 'grid'; let columnHeaders = []; for (let child of node.children) { if (child.tagName === 'thead') { - child.properties.className = 'pf-v5-c-table__thead'; + child.properties.className = 'pf-v6-c-table__thead'; // Find column headers const tr = child.children.find(child => child.tagName === 'tr'); tr.properties.role = 'row'; - tr.properties.className = 'pf-v5-c-table__tr'; + tr.properties.className = 'pf-v6-c-table__tr'; tr.children .filter(child => child.tagName === 'th') .forEach(th => { - th.properties.className = `${th.properties.className} pf-v5-c-table__th pf-m-wrap`; + th.properties.className = `${th.properties.className} pf-v6-c-table__th pf-m-wrap`; th.properties.role = 'columnheader'; th.properties.scope = 'col'; let colName = ''; @@ -57,17 +64,17 @@ function styledTags() { } else if (child.tagName === 'tbody') { child.properties.role = 'rowgroup'; - child.properties.className = 'pf-v5-c-table__tbody'; + child.properties.className = 'pf-v6-c-table__tbody'; child.children .filter(tr => tr.tagName === 'tr') .forEach(tr => { tr.properties.role = 'row'; - tr.properties.className = 'pf-v5-c-table__tr'; + tr.properties.className = 'pf-v6-c-table__tr'; tr.children .filter(td => td.tagName === 'td') .forEach((td, i) => { td.properties.role = 'cell'; - td.properties.className = 'pf-v5-c-table__td'; + td.properties.className = 'pf-v6-c-table__td'; if (columnHeaders[i]) { td.properties['data-label'] = columnHeaders[i]; } diff --git a/packages/documentation-framework/templates/mdx.css b/packages/documentation-framework/templates/mdx.css index 67c6faf9a8..fa2f230c29 100644 --- a/packages/documentation-framework/templates/mdx.css +++ b/packages/documentation-framework/templates/mdx.css @@ -47,10 +47,6 @@ /* font-family: var(--pf-v6-global--FontFamily--monospace); */ } -.ws-p + .ws-code { - margin-bottom: var(--pf-v6-c-content--MarginBottom); -} - .ws-image { text-align: center; width: "600px"; @@ -89,220 +85,12 @@ vertical-align: top; } -/* - * Copied from pf-v6-c-content. - */ -:root { - --pf-v6-c-content--MarginBottom: var(--pf-t--global--spacer--md); -/* --pf-v6-c-content--LineHeight: var(--pf-v6-global--LineHeight--md); */ -/* --pf-v6-c-content--FontSize: var(--pf-v6-global--FontSize--md); */ -/* --pf-v6-c-content--FontWeight: var(--pf-v6-global--FontWeight--normal); */ -/* --pf-v6-c-content--Color: var(--pf-v6-global--Color--100); */ -/* --pf-v6-c-content--heading--FontFamily: var(--pf-v6-global--FontFamily--heading); */ - --pf-v6-c-content--h1--MarginTop: var(--pf-t--global--spacer--lg); - --pf-v6-c-content--h1--MarginBottom: var(--pf-t--global--spacer--sm); -/* --pf-v6-c-content--h1--LineHeight: var(--pf-v6-global--LineHeight--sm); */ -/* --pf-v6-c-content--h1--FontSize: var(--pf-v6-global--FontSize--2xl); */ -/* --pf-v6-c-content--h1--FontWeight: var(--pf-v6-global--FontWeight--normal); */ - --pf-v6-c-content--h2--MarginTop: var(--pf-t--global--spacer--lg); - --pf-v6-c-content--h2--MarginBottom: var(--pf-t--global--spacer--sm); -/* --pf-v6-c-content--h2--LineHeight: var(--pf-v6-global--LineHeight--sm); */ -/* --pf-v6-c-content--h2--FontSize: var(--pf-v6-global--FontSize--xl); */ -/* --pf-v6-c-content--h2--FontWeight: var(--pf-v6-global--FontWeight--normal); */ - --pf-v6-c-content--h3--MarginTop: var(--pf-t--global--spacer--lg); - --pf-v6-c-content--h3--MarginBottom: var(--pf-t--global--spacer--sm); -/* --pf-v6-c-content--h3--LineHeight: var(--pf-v6-global--LineHeight--md); */ -/* --pf-v6-c-content--h3--FontSize: var(--pf-v6-global--FontSize--lg); */ -/* --pf-v6-c-content--h3--FontWeight: var(--pf-v6-global--FontWeight--normal); */ - --pf-v6-c-content--h4--MarginTop: var(--pf-t--global--spacer--lg); - --pf-v6-c-content--h4--MarginBottom: var(--pf-t--global--spacer--sm); -/* --pf-v6-c-content--h4--LineHeight: var(--pf-v6-global--LineHeight--md); */ -/* --pf-v6-c-content--h4--FontSize: var(--pf-v6-global--FontSize--md); */ -/* --pf-v6-c-content--h4--FontWeight: var(--pf-v6-global--FontWeight--semi-bold); */ - --pf-v6-c-content--h5--MarginTop: var(--pf-t--global--spacer--lg); - --pf-v6-c-content--h5--MarginBottom: var(--pf-t--global--spacer--sm); -/* --pf-v6-c-content--h5--LineHeight: var(--pf-v6-global--LineHeight--md); */ -/* --pf-v6-c-content--h5--FontSize: var(--pf-v6-global--FontSize--md); */ -/* --pf-v6-c-content--h5--FontWeight: var(--pf-v6-global--FontWeight--semi-bold); */ - --pf-v6-c-content--h6--MarginTop: var(--pf-t--global--spacer--lg); - --pf-v6-c-content--h6--MarginBottom: var(--pf-t--global--spacer--sm); -/* --pf-v6-c-content--h6--LineHeight: var(--pf-v6-global--LineHeight--md); */ -/* --pf-v6-c-content--h6--FontSize: var(--pf-v6-global--FontSize--md); */ -/* --pf-v6-c-content--h6--FontWeight: var(--pf-v6-global--FontWeight--semi-bold); */ - --pf-v6-c-content--small--MarginBottom: var(--pf-t--global--spacer--md); -/* --pf-v6-c-content--small--LineHeight: var(--pf-v6-global--LineHeight--md); */ -/* --pf-v6-c-content--small--FontSize: var(--pf-v6-global--FontSize--sm); */ -/* --pf-v6-c-content--small--Color: var(--pf-v6-global--Color--200); */ -/* --pf-v6-c-content--small--FontWeight: var(--pf-v6-global--FontWeight--semi-bold); */ -/* --pf-v6-c-content--a--Color: var(--pf-v6-global--link--Color); */ -/* --pf-v6-c-content--a--TextDecoration: var(--pf-v6-global--link--TextDecoration); */ -/* --pf-v6-c-content--a--hover--Color: var(--pf-v6-global--link--Color--hover); */ -/* --pf-v6-c-content--a--hover--TextDecoration: var(--pf-v6-global--link--TextDecoration--hover); */ - --pf-v6-c-content--blockquote--PaddingTop: var(--pf-t--global--spacer--md); - --pf-v6-c-content--blockquote--PaddingRight: var(--pf-t--global--spacer--md); - --pf-v6-c-content--blockquote--PaddingBottom: var(--pf-t--global--spacer--md); - --pf-v6-c-content--blockquote--PaddingLeft: var(--pf-t--global--spacer--md); -/* --pf-v6-c-content--blockquote--FontWeight: var(--pf-v6-global--FontWeight--light); */ -/* --pf-v6-c-content--blockquote--Color: var(--pf-v6-global--Color--200); */ -/* --pf-v6-c-content--blockquote--BorderLeftColor: var(--pf-v6-global--BorderColor--100); */ -/* --pf-v6-c-content--blockquote--BorderLeftWidth: var(--pf-v6-global--BorderWidth--lg); */ - --pf-v6-c-content--ol--PaddingLeft: var(--pf-t--global--spacer--lg); - --pf-v6-c-content--ol--MarginTop: var(--pf-t--global--spacer--md); - --pf-v6-c-content--ol--MarginLeft: var(--pf-t--global--spacer--lg); - --pf-v6-c-content--ol--nested--MarginTop: var(--pf-t--global--spacer--sm); - --pf-v6-c-content--ol--nested--MarginLeft: var(--pf-t--global--spacer--sm); - --pf-v6-c-content--ul--PaddingLeft: var(--pf-t--global--spacer--lg); - --pf-v6-c-content--ul--MarginTop: var(--pf-t--global--spacer--md); - --pf-v6-c-content--ul--MarginLeft: var(--pf-t--global--spacer--lg); - --pf-v6-c-content--ul--nested--MarginTop: var(--pf-t--global--spacer--sm); - --pf-v6-c-content--ul--nested--MarginLeft: var(--pf-t--global--spacer--sm); -/* --pf-v6-c-content--ul--ListStyle: var(--pf-v6-global--ListStyle); */ - --pf-v6-c-content--li--MarginTop: var(--pf-t--global--spacer--sm); - --pf-v6-c-content--dl--ColumnGap: var(--pf-t--global--spacer--2xl); - --pf-v6-c-content--dl--RowGap: var(--pf-t--global--spacer--md); -/* --pf-v6-c-content--dt--FontWeight: var(--pf-v6-global--FontWeight--semi-bold); */ - --pf-v6-c-content--dt--MarginTop: var(--pf-t--global--spacer--md); - --pf-v6-c-content--dt--sm--MarginTop: 0; -/* --pf-v6-c-content--hr--Height: var(--pf-v6-global--BorderWidth--sm); */ -/* --pf-v6-c-content--hr--BackgroundColor: var(--pf-v6-global--BorderColor--100); */ - font-size: var(--pf-v6-c-content--FontSize); - line-height: var(--pf-v6-c-content--LineHeight); - color: var(--pf-v6-c-content--Color); } -.ws-li + li { - margin-top: var(--pf-v6-c-content--li--MarginTop); } -.ws-p:not(:last-child), -.ws-dl:not(:last-child), -.ws-ol:not(:last-child), -.ws-ul:not(:last-child), -.ws-blockquote:not(:last-child), -.ws-small:not(:last-child), -.ws-pre:not(:last-child), -.ws-hr:not(:last-child), -.ws-table:not(:last-child), -.ws-content-table:not(:last-child) { - margin-bottom: var(--pf-v6-c-content--MarginBottom); } -.ws-h1, -.ws-h2, -.ws-h3, -.ws-h4, -.ws-h5, -.ws-h6 { - margin: 0; - font-family: var(--pf-v6-c-content--heading--FontFamily); } -.ws-ol, -.ws-ul { - margin: 0; } -.ws-h1 { - margin-bottom: var(--pf-v6-c-content--h1--MarginBottom); - font-size: var(--pf-v6-c-content--h1--FontSize); - font-weight: var(--pf-v6-c-content--h1--FontWeight); - line-height: var(--pf-v6-c-content--h1--LineHeight); } - .ws-h1:not(:first-child) { - margin-top: var(--pf-v6-c-content--h1--MarginTop); } -.ws-h2 { - margin-bottom: var(--pf-v6-c-content--h2--MarginBottom); - font-size: var(--pf-v6-c-content--h2--FontSize); - font-weight: var(--pf-v6-c-content--h2--FontWeight); - line-height: var(--pf-v6-c-content--h2--LineHeight); - margin-top: var(--pf-v6-c-content--h2--MarginTop); } -.ws-h3 { - margin-bottom: var(--pf-v6-c-content--h3--MarginBottom); - font-size: var(--pf-v6-c-content--h3--FontSize); - font-weight: var(--pf-v6-c-content--h3--FontWeight); - line-height: var(--pf-v6-c-content--h3--LineHeight); } - .ws-h3:not(:first-child) { - margin-top: var(--pf-v6-c-content--h3--MarginTop); } -.ws-h4 { - margin-bottom: var(--pf-v6-c-content--h4--MarginBottom); - font-size: var(--pf-v6-c-content--h4--FontSize); - font-weight: var(--pf-v6-c-content--h4--FontWeight); - line-height: var(--pf-v6-c-content--h4--LineHeight); } - .ws-h4:not(:first-child) { - margin-top: var(--pf-v6-c-content--h4--MarginTop); } -.ws-h5 { - margin-bottom: var(--pf-v6-c-content--h5--MarginBottom); - font-size: var(--pf-v6-c-content--h5--FontSize); - font-weight: var(--pf-v6-c-content--h5--FontWeight); - line-height: var(--pf-v6-c-content--h5--LineHeight); } - .ws-h5:not(:first-child) { - margin-top: var(--pf-v6-c-content--h5--MarginTop); } -.ws-h6 { - margin-bottom: var(--pf-v6-c-content--h6--MarginBottom); - font-size: var(--pf-v6-c-content--h6--FontSize); - font-weight: var(--pf-v6-c-content--h6--FontWeight); - line-height: var(--pf-v6-c-content--h6--LineHeight); } - .ws-h6:not(:first-child) { - margin-top: var(--pf-v6-c-content--h6--MarginTop); } -.ws-small { - display: block; - font-size: var(--pf-v6-c-content--small--FontSize); - line-height: var(--pf-v6-c-content--small--LineHeight); - color: var(--pf-v6-c-content--small--Color); } - .ws-small:not(:last-child) { - margin-bottom: var(--pf-v6-c-content--small--MarginBottom); } -.ws-blockquote { - padding: var(--pf-v6-c-content--blockquote--PaddingTop) var(--pf-v6-c-content--blockquote--PaddingRight) var(--pf-v6-c-content--blockquote--PaddingBottom) var(--pf-v6-c-content--blockquote--PaddingLeft); - font-weight: var(--pf-v6-c-content--blockquote--FontWeight); - color: var(--pf-v6-c-content--blockquote--Color); - border-left: var(--pf-v6-c-content--blockquote--BorderLeftWidth) solid var(--pf-v6-c-content--blockquote--BorderLeftColor); } -.ws-hr { - height: var(--pf-v6-c-content--hr--Height); - background-color: var(--pf-v6-c-content--hr--BackgroundColor); - border: none; } -.ws-ol { - padding-left: var(--pf-v6-c-content--ol--PaddingLeft); - margin-top: var(--pf-v6-c-content--ol--MarginTop); - margin-left: var(--pf-v6-c-content--ol--MarginLeft); } - .ws-ol ul { - --pf-v6-c-content--ul--MarginTop: var(--pf-v6-c-content--ul--nested--MarginTop); - --pf-v6-c-content--ul--MarginLeft: var(--pf-v6-c-content--ul--nested--MarginLeft); } - .ws-ol ol { - --pf-v6-c-content--ol--MarginTop: var(--pf-v6-c-content--ol--nested--MarginTop); - --pf-v6-c-content--ol--MarginLeft: var(--pf-v6-c-content--ol--nested--MarginLeft); } -.ws-ul { - padding-left: var(--pf-v6-c-content--ul--PaddingLeft); - margin-top: var(--pf-v6-c-content--ul--MarginTop); - margin-left: var(--pf-v6-c-content--ul--MarginLeft); - list-style: var(--pf-v6-c-content--ul--ListStyle); } - .ws-ul ul { - --pf-v6-c-content--ul--MarginTop: var(--pf-v6-c-content--ul--nested--MarginTop); - --pf-v6-c-content--ul--MarginLeft: var(--pf-v6-c-content--ul--nested--MarginLeft); } - .ws-ul ol { - --pf-v6-c-content--ol--MarginTop: var(--pf-v6-c-content--ol--nested--MarginTop); - --pf-v6-c-content--ol--MarginLeft: var(--pf-v6-c-content--ol--nested--MarginLeft); } -.ws-dl { - display: grid; - grid-template-columns: 1fr; } - @media screen and (min-width: 576px) { - .ws-dl { - grid-template: auto / auto 1fr; - grid-column-gap: var(--pf-v6-c-content--dl--ColumnGap); - grid-row-gap: var(--pf-v6-c-content--dl--RowGap); } } -.ws-dt { - font-weight: var(--pf-v6-c-content--dt--FontWeight); } - .ws-dt:not(:first-child) { - margin-top: var(--pf-v6-c-content--dt--MarginTop); } - @media screen and (min-width: 576px) { - .ws-dt:not(:first-child) { - --pf-v6-c-content--dt--MarginTop: var(--pf-v6-c-content--dt--sm--MarginTop); } } - @media screen and (min-width: 576px) { - .ws-dt { - grid-column: 1; } } -@media screen and (min-width: 576px) { - .ws-dd { - grid-column: 2; } } - @media screen and (max-width: 1450px) { .ws-mdx-child-template { flex-direction: column; } } -.ws-mdx-content { - flex-grow: 1; - min-width: 0; -} - /* Design asked for this. A nice side effect is that the TOC doesn't "jump" between pages */ .ws-mdx-content-content { max-width: 832px; diff --git a/packages/documentation-framework/templates/mdx.js b/packages/documentation-framework/templates/mdx.js index a411723eed..29266684dc 100644 --- a/packages/documentation-framework/templates/mdx.js +++ b/packages/documentation-framework/templates/mdx.js @@ -98,13 +98,13 @@ const MDXChildTemplate = ({ {toc.length > 1 && ( )} -
+
{InlineAlerts} {functionDocumentation.length > 0 && ( - + Functions @@ -112,7 +112,7 @@ const MDXChildTemplate = ({ )} {propsTitle && ( - + {propsTitle} {propComponents.map(component => ( @@ -128,7 +128,7 @@ const MDXChildTemplate = ({ )} {cssPrefix.length > 0 && ( - + {cssVarsTitle} {cssPrefix.map((prefix, index) => ( diff --git a/packages/documentation-site/package.json b/packages/documentation-site/package.json index 170e6442b5..0f4bfb7a99 100644 --- a/packages/documentation-site/package.json +++ b/packages/documentation-site/package.json @@ -17,7 +17,7 @@ "screenshots": "pf-docs-framework screenshots" }, "dependencies": { - "@patternfly/documentation-framework": "6.0.0-alpha.28", + "@patternfly/documentation-framework": "6.0.0-alpha.30", "@patternfly/quickstarts": "^5.1.0", "@patternfly/react-catalog-view-extension": "5.0.0", "@patternfly/react-console": "5.0.0", diff --git a/packages/documentation-site/patternfly-docs/content/accessibility/about-modal/about-modal.md b/packages/documentation-site/patternfly-docs/content/accessibility/about-modal/about-modal.md index 84f2618197..5b0d4eb245 100644 --- a/packages/documentation-site/patternfly-docs/content/accessibility/about-modal/about-modal.md +++ b/packages/documentation-site/patternfly-docs/content/accessibility/about-modal/about-modal.md @@ -55,12 +55,12 @@ The following HTML attributes and PatternFly classes can be used for more fine-t | Attribute or class | Applied to | Reason | |---|---|---| -| `aria-label="[text that labels the about modal]"` | `.pf-v5-c-modal-box` | Adds an accessible name to the about modal. **Required** when there is not visible product name heading. Typically the value passed in will be the product name itself. | -| `aria-labelledby="[id of the element that labels the about modal]"` | `.pf-v5-c-modal-box` | Adds an accessible name to the about modal. **Required** when there is a visible product name heading. | -| `role="dialog"` | `.pf-v5-c-modal-box` | Adds an accessibile role to the about modal. **Required**. | -| `aria-modal="true"` | `.pf-v5-c-modal-box` | Marks the dialog as a modal. **Required**. | -| `alt="[alt text of the brand image]"` | `.pf-v5-c-about-modal-box__brand-image` | Adds alternative text for the brand image. Typically this should either be an empty string `''` if the brand image is purely decorative, or the product name. | -| `aria-label="[text that labels the close button]"` | `.pf-v5-c-about-modal-box__close > .pf-v5-c-button` | Adds an accessible name to the close button of the about modal. | +| `aria-label="[text that labels the about modal]"` | `.pf-v6-c-modal-box` | Adds an accessible name to the about modal. **Required** when there is not visible product name heading. Typically the value passed in will be the product name itself. | +| `aria-labelledby="[id of the element that labels the about modal]"` | `.pf-v6-c-modal-box` | Adds an accessible name to the about modal. **Required** when there is a visible product name heading. | +| `role="dialog"` | `.pf-v6-c-modal-box` | Adds an accessibile role to the about modal. **Required**. | +| `aria-modal="true"` | `.pf-v6-c-modal-box` | Marks the dialog as a modal. **Required**. | +| `alt="[alt text of the brand image]"` | `.pf-v6-c-about-modal-box__brand-image` | Adds alternative text for the brand image. Typically this should either be an empty string `''` if the brand image is purely decorative, or the product name. | +| `aria-label="[text that labels the close button]"` | `.pf-v6-c-about-modal-box__close > .pf-v6-c-button` | Adds an accessible name to the close button of the about modal. | ## Additional considerations diff --git a/packages/documentation-site/patternfly-docs/content/accessibility/accordion/accordion.md b/packages/documentation-site/patternfly-docs/content/accessibility/accordion/accordion.md index ca5d36695b..d44d02ac3d 100644 --- a/packages/documentation-site/patternfly-docs/content/accessibility/accordion/accordion.md +++ b/packages/documentation-site/patternfly-docs/content/accessibility/accordion/accordion.md @@ -94,11 +94,11 @@ The following HTML attributes and PatternFly classes can be used for more fine-t | Attribute or class | Applied to | Reason | |---|---|---| -| `aria-label="[text that labels the accordion component]"` | `.pf-v5-c-accordion` | Adds an accessible name to the accordion for screen readers. If there is no other surrounding context provided for an accordion, especially if there are multiple accordions on a page, this should be passed in with descriptive text.

See the [aria-label prop example](#aria-label) in the React customization section. | -| `aria-expanded="[true or false]"` | `.pf-v5-c-accordion__toggle` | Indicates whether the accordion toggle is expanded (true) or collapsed (false) to assistive technologies. **Required**. | -| `aria-label="[text that labels the accordion content]"` | `.pf-v5-c-accordion__expanded-content` | Adds an accessible name to the content of an accordion item. | -| `hidden` | `.pf-v5-c-accordion__expanded-content` | Hides the accordion content. **Required** when `aria-expanded="false"` is passed in. | -| `aria-hidden="true"` | `.pf-v5-c-accordion__toggle-icon > i` | Removes the accordion toggle icon from the accessibility tree, preventing assistive technologies from potentially announcing duplicate or unnecessary information without visually hiding it. **Required**. | +| `aria-label="[text that labels the accordion component]"` | `.pf-v6-c-accordion` | Adds an accessible name to the accordion for screen readers. If there is no other surrounding context provided for an accordion, especially if there are multiple accordions on a page, this should be passed in with descriptive text.

See the [aria-label prop example](#aria-label) in the React customization section. | +| `aria-expanded="[true or false]"` | `.pf-v6-c-accordion__toggle` | Indicates whether the accordion toggle is expanded (true) or collapsed (false) to assistive technologies. **Required**. | +| `aria-label="[text that labels the accordion content]"` | `.pf-v6-c-accordion__expanded-content` | Adds an accessible name to the content of an accordion item. | +| `hidden` | `.pf-v6-c-accordion__expanded-content` | Hides the accordion content. **Required** when `aria-expanded="false"` is passed in. | +| `aria-hidden="true"` | `.pf-v6-c-accordion__toggle-icon > i` | Removes the accordion toggle icon from the accessibility tree, preventing assistive technologies from potentially announcing duplicate or unnecessary information without visually hiding it. **Required**. | ## Additional considerations diff --git a/packages/documentation-site/patternfly-docs/content/accessibility/alert/alert.md b/packages/documentation-site/patternfly-docs/content/accessibility/alert/alert.md index 1888b0ce74..85bc137850 100644 --- a/packages/documentation-site/patternfly-docs/content/accessibility/alert/alert.md +++ b/packages/documentation-site/patternfly-docs/content/accessibility/alert/alert.md @@ -76,12 +76,12 @@ The following HTML attributes and PatternFly classes can be used for more fine-t | Attribute or class | Applied to | Reason | |---|---|---| -| `.pf-screen-reader` | `.pf-v5-c-alert__title ` | Should be used to add text to the alert title that is accessible only to assistive technologies and is not visually rendered. The text content of this element should state the type of alert and should preface the alert title. | -| `aria-label="[text that labels the alert close button]"` | `.pf-v5-c-button.pf-m-plain` | Adds an accessible name to the alert close button. The value passed in should generally indicate that the button will close the alert and what alert will be closed, typically by referencing the alert title. | -| `hidden` | `.pf-v5-c-alert__description` | Hides the expandable alert description content. **Required** when `aria-expanded="false"` is passed into `.pf-v5-c-alert__toggle`. | -| `aria-expanded="[true or false]"` | `.pf-v5-c-alert__toggle` | Indicates whether the alert toggle is expanded (true) or collapsed (false) to assistive technologies and that the expandable alert description is hidden. **Required**. | -| `aria-label="[text that labels the alert toggle]"` | `.pf-v5-c-button.pf-m-plain` | Adds an accessible name to the alert toggle when the `aria-expanded` attribute is also passed in. The value passed in should provide context as to which alert will be expanded/collapsed and what type of information is within the expandable area. | -| `aria-hidden="true"` | `.pf-v5-c-alert__icon ` | Removes the expandable alert toggle icon from the accessibility tree, preventing assistive technologies from potentially announcing duplicate or unnecessary information without visually hiding it. **Required**. | +| `.pf-screen-reader` | `.pf-v6-c-alert__title ` | Should be used to add text to the alert title that is accessible only to assistive technologies and is not visually rendered. The text content of this element should state the type of alert and should preface the alert title. | +| `aria-label="[text that labels the alert close button]"` | `.pf-v6-c-button.pf-m-plain` | Adds an accessible name to the alert close button. The value passed in should generally indicate that the button will close the alert and what alert will be closed, typically by referencing the alert title. | +| `hidden` | `.pf-v6-c-alert__description` | Hides the expandable alert description content. **Required** when `aria-expanded="false"` is passed into `.pf-v6-c-alert__toggle`. | +| `aria-expanded="[true or false]"` | `.pf-v6-c-alert__toggle` | Indicates whether the alert toggle is expanded (true) or collapsed (false) to assistive technologies and that the expandable alert description is hidden. **Required**. | +| `aria-label="[text that labels the alert toggle]"` | `.pf-v6-c-button.pf-m-plain` | Adds an accessible name to the alert toggle when the `aria-expanded` attribute is also passed in. The value passed in should provide context as to which alert will be expanded/collapsed and what type of information is within the expandable area. | +| `aria-hidden="true"` | `.pf-v6-c-alert__icon ` | Removes the expandable alert toggle icon from the accessibility tree, preventing assistive technologies from potentially announcing duplicate or unnecessary information without visually hiding it. **Required**. | When using JavaScript to automatically dismiss alerts, read the `timeout` prop row in the [React customization](#react-customization) section for details on an accessible implementation. @@ -89,8 +89,8 @@ When using JavaScript to automatically dismiss alerts, read the `timeout` prop r | Attribute or class | Applied to | Reason | |---|---|---| -| `aria-live="polite"` | `.pf-v5-c-alert-group` | Makes the alert group a live region. **Required** when alerts are intended or expected to dynamically appear or update within the alert group. | -| `.pf-m-toast` | `.pf-v5-c-alert-group` | Adds styling to position alerts in the top-right corner of the viewport. When passing this prop in, `aria-live="polite"` must also be passed in. For more information about accessibility with toast alerts, read the [toast alerts](/components/alert/accessibility#toast-alerts) section of the alert accessibility tab. | +| `aria-live="polite"` | `.pf-v6-c-alert-group` | Makes the alert group a live region. **Required** when alerts are intended or expected to dynamically appear or update within the alert group. | +| `.pf-m-toast` | `.pf-v6-c-alert-group` | Adds styling to position alerts in the top-right corner of the viewport. When passing this prop in, `aria-live="polite"` must also be passed in. For more information about accessibility with toast alerts, read the [toast alerts](/components/alert/accessibility#toast-alerts) section of the alert accessibility tab. | When using an overflow button for alerts, read the `overflowMessage` prop row in the [React customization](#react-customization) section for details on an accessible implementation. diff --git a/packages/documentation-site/patternfly-docs/content/accessibility/application-launcher/application-launcher.md b/packages/documentation-site/patternfly-docs/content/accessibility/application-launcher/application-launcher.md index 3b81b03582..54a18a354f 100644 --- a/packages/documentation-site/patternfly-docs/content/accessibility/application-launcher/application-launcher.md +++ b/packages/documentation-site/patternfly-docs/content/accessibility/application-launcher/application-launcher.md @@ -47,14 +47,14 @@ The following HTML attributes and PatternFly classes can be used for more fine-t | Attribute or class | Applied to | Reason | |---|---|---| -| `aria-label="[unique text that labels the application launcher]"` | `.pf-v5-c-app-launcher` | Adds an accessible name to the application launcher `