From 2c96078a1cf75534d0468193cd5a0087665675b0 Mon Sep 17 00:00:00 2001 From: ry061521 Date: Tue, 19 Sep 2023 13:14:19 -0500 Subject: [PATCH] Add header examples to the main site page --- .../terra-clinical-item-view/package.json | 1 + .../clinicalItemView.1.doc.mdx | 58 ++++++++++++++++++- .../example/ItemViewTwoColumnWithHeader.jsx | 20 +++++++ .../doc/example/ItemViewWithHeader.jsx | 19 ++++++ 4 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 packages/terra-clinical-item-view/src/terra-dev-site/doc/example/ItemViewTwoColumnWithHeader.jsx create mode 100644 packages/terra-clinical-item-view/src/terra-dev-site/doc/example/ItemViewWithHeader.jsx diff --git a/packages/terra-clinical-item-view/package.json b/packages/terra-clinical-item-view/package.json index 717452c76..0cab5e0fd 100644 --- a/packages/terra-clinical-item-view/package.json +++ b/packages/terra-clinical-item-view/package.json @@ -30,6 +30,7 @@ "classnames": "^2.2.5", "prop-types": "^15.5.8", "terra-clinical-item-display": "^4.9.0", + "terra-heading": "^4.52.0", "terra-icon": "^3.0.0", "terra-mixins": "^1.0.0", "terra-theme-context": "^1.0.0" diff --git a/packages/terra-clinical-item-view/src/terra-dev-site/doc/clinical-item-view/clinicalItemView.1.doc.mdx b/packages/terra-clinical-item-view/src/terra-dev-site/doc/clinical-item-view/clinicalItemView.1.doc.mdx index bef22a163..6069e4fec 100644 --- a/packages/terra-clinical-item-view/src/terra-dev-site/doc/clinical-item-view/clinicalItemView.1.doc.mdx +++ b/packages/terra-clinical-item-view/src/terra-dev-site/doc/clinical-item-view/clinicalItemView.1.doc.mdx @@ -1,4 +1,5 @@ import { Badge } from 'terra-clinical-item-view/package.json?dev-site-package'; +import { Notice } from "@cerner/terra-docs"; import ItemViewStandard from '../example/ItemViewStandard?dev-site-example'; import ItemViewTwoColumn from '../example/ItemViewTwoColumn?dev-site-example'; @@ -8,6 +9,8 @@ import ItemViewComment from '../example/ItemViewComment?dev-site-example'; import ItemViewAll from '../example/ItemViewAll?dev-site-example'; import ItemViewAllTopAligned from '../example/ItemViewAllTopAligned?dev-site-example'; import ItemViewOverrideDefaultStyling from '../example/ItemViewOverrideDefaultStyling?dev-site-example'; +import ItemViewWithHeader from '../example/ItemViewWithHeader?dev-site-example'; +import ItemViewTwoColumnWithHeader from '../example/ItemViewTwoColumnWithHeader?dev-site-example'; import ItemViewProps from 'terra-clinical-item-view/src/ItemView.jsx?dev-site-props-table'; @@ -32,15 +35,66 @@ import ItemView from 'terra-clinical-item-view'; * [Responsive Support](https://engineering.cerner.com/terra-ui/about/terra-ui/component-standards#responsive-support) * [Mobile Support](https://engineering.cerner.com/terra-ui/about/terra-ui/component-standards#mobile-support) +## Accessibility + + + +#### Accessibility Guidance: Headers + +For the purposes of accessibility compliance, it is **strongly** suggested to include a header element directly above +the Clinical Item View during implementation. This ensures that the list of displays in the view have proper context. +**The header not only acts as the main label for what the view contains, but also helps with page navigation.** + +Consumers can use the Terra Core Heading component found [here](https://engineering.cerner.com/terra-ui/components/cerner-terra-core-docs/heading/about) +or the Clincial Header component found [here](https://engineering.cerner.com/terra-clinical/components/terra-clinical-header/clinical-header/clinical-header). +Refer to A11y standards for how to properly implement headings in the context of your webpage. Further information can be found on the Clinical Item View accessibility guide. + +The following are two examples of how to implement a header for the one column and two column layouts. + + + + + + + + +#### Accessibility Guidance: Truncated Text + +Truncation of text can pose an accessibility concern if no method of disclosing the full text is available +to the user. When using `isTruncated`, consumers are responsible for providing a progressive disclosure pattern + to disclose the full Item Display text in order to ensure that it is accessible for keyboard navigation users. + +**There should always be a method of accessing the truncated information. If there is no way to progressively +disclose the full content of the truncated information, then truncation should not be used.** + +Some examples of progressive disclosure patterns that may be used to disclose truncated information include: +- Accordions +- Dialogs +- Popovers +- Show/Hide +- Split Views +- Toasts + +The method of disclosure **must** be accessible via keyboard interactions. + +Truncation should be avoided where it is not necessary. Certain content should **never** be truncated (i.e. +medication names and dosages in menus where the user is selecting from a list of choices). + + + ## Examples diff --git a/packages/terra-clinical-item-view/src/terra-dev-site/doc/example/ItemViewTwoColumnWithHeader.jsx b/packages/terra-clinical-item-view/src/terra-dev-site/doc/example/ItemViewTwoColumnWithHeader.jsx new file mode 100644 index 000000000..bdd06fbb1 --- /dev/null +++ b/packages/terra-clinical-item-view/src/terra-dev-site/doc/example/ItemViewTwoColumnWithHeader.jsx @@ -0,0 +1,20 @@ +import React from 'react'; +import Heading from 'terra-heading'; +import IconBriefcase from 'terra-icon/lib/icon/IconBriefcase'; +import IconPerson from 'terra-icon/lib/icon/IconPerson'; +import ItemView from 'terra-clinical-item-view'; + +const display1 = } iconAlignment="inline" text="Asif Khan" />; +const display2 = } iconAlignment="inline" text="Care Position: Primary" />; +const display3 = ; +const display4 = ; +const display5 = ; +const display6 = ; +const displays = [display1, display2, display3, display4, display5, display6]; + +export default () => ( +
+ Patient Information + +
+); diff --git a/packages/terra-clinical-item-view/src/terra-dev-site/doc/example/ItemViewWithHeader.jsx b/packages/terra-clinical-item-view/src/terra-dev-site/doc/example/ItemViewWithHeader.jsx new file mode 100644 index 000000000..cc0ae27a9 --- /dev/null +++ b/packages/terra-clinical-item-view/src/terra-dev-site/doc/example/ItemViewWithHeader.jsx @@ -0,0 +1,19 @@ +import React from 'react'; +import Heading from 'terra-heading'; +import IconPerson from 'terra-icon/lib/icon/IconPerson'; +import ItemView from 'terra-clinical-item-view'; + +const display1 = } iconAlignment="inline" text="Asif Khan" />; +const display2 = ; +const display3 = ; +const display4 = ; +const display5 = ; +const display6 = ; +const displays = [display1, display2, display3, display4, display5, display6]; + +export default () => ( +
+ Patient Information + +
+);