Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

[terra-show-hide] prop to focus on the element added #3838

Merged
merged 107 commits into from
Aug 14, 2023
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
3696633
[terra-show-hide] Shift keyboard focus to newly revealed content with…
adoroshk Jun 30, 2023
94d6602
prop to focus on the element added
adoroshk Jul 7, 2023
8a20716
changelogs updated
adoroshk Jul 7, 2023
b18c84a
terra-core-docs changelog fix
adoroshk Jul 7, 2023
89be1c4
dox changelog removed
adoroshk Jul 7, 2023
5f0bf23
text edits, comments added
adoroshk Jul 7, 2023
b1cb04c
text edits
adoroshk Jul 7, 2023
c3ece59
text edits
adoroshk Jul 7, 2023
9a5deff
extra line removed
adoroshk Jul 7, 2023
072099c
changelog in terra-core-docs updated
adoroshk Jul 7, 2023
b230366
docs, tests and examples updated
adoroshk Jul 10, 2023
52bcd8f
wdio snapshots updated
adoroshk Jul 10, 2023
848c29f
better wording
adoroshk Jul 10, 2023
ccf7a43
removed extra 'props' before focusRef
adoroshk Jul 10, 2023
b28173d
wdio tests enhanced coverage
adoroshk Jul 11, 2023
a8e457b
[terra-show-hide] Shift keyboard focus to newly revealed content with…
adoroshk Jun 30, 2023
c7a4f09
prop to focus on the element added
adoroshk Jul 7, 2023
f21df4a
changelogs updated
adoroshk Jul 7, 2023
d506978
terra-core-docs changelog fix
adoroshk Jul 7, 2023
41f2664
text edits, comments added
adoroshk Jul 7, 2023
af989d2
text edits
adoroshk Jul 7, 2023
bf7a1c8
text edits
adoroshk Jul 7, 2023
65bd67e
extra line removed
adoroshk Jul 7, 2023
ec8e2fe
changelog in terra-core-docs updated
adoroshk Jul 7, 2023
aed44ee
docs, tests and examples updated
adoroshk Jul 10, 2023
afa2305
wdio snapshots updated
adoroshk Jul 10, 2023
eb321d7
better wording
adoroshk Jul 10, 2023
8329d69
removed extra 'props' before focusRef
adoroshk Jul 10, 2023
7331103
wdio tests enhanced coverage
adoroshk Jul 11, 2023
0cca372
changelog fix
adoroshk Jul 11, 2023
db8474e
Merge branch 'terra-show-hide-focusing' of https://github.com/cerner/…
adoroshk Jul 11, 2023
a73b621
removed unused css for focusing span, propType for focusRef fixed
adoroshk Jul 11, 2023
76da4f0
jest test update
adoroshk Jul 12, 2023
aebb65b
focus css lighter border
adoroshk Jul 12, 2023
1058492
css styles for focus combined
adoroshk Jul 12, 2023
b87f7ad
removed data-focus-styles-enabled attribute
adoroshk Jul 12, 2023
6d1d090
activeElement added to state
adoroshk Jul 13, 2023
25e6d2b
conditional role for container
adoroshk Jul 13, 2023
74d9818
Merge branch 'main' into terra-show-hide-focusing
adoroshk Jul 13, 2023
7e33876
test and lint updates
adoroshk Jul 13, 2023
efbb870
Merge branch 'terra-show-hide-focusing' of https://github.com/cerner/…
adoroshk Jul 13, 2023
535dadd
wdio screenshot updates per style changed
adoroshk Jul 14, 2023
170f7cb
checks for role before replacing it, replaces activeElement with 3 op…
adoroshk Jul 14, 2023
22a779d
import fix, isModified variable added
adoroshk Jul 15, 2023
831987f
fix for forgotten role
adoroshk Jul 15, 2023
4d398fe
focus border inherits color
adoroshk Jul 18, 2023
d6b8635
fusion theme dashed outline
adoroshk Jul 18, 2023
3db7955
Merge branch 'main' of https://github.com/cerner/terra-core into terr…
adoroshk Jul 19, 2023
39e028f
snapshots updated
adoroshk Jul 20, 2023
3cc0b6f
Merge branch 'main' into terra-show-hide-focusing
adoroshk Jul 20, 2023
ae25222
divider for JAWS reading line-by-line
adoroshk Jul 20, 2023
b37422c
Merge branch 'terra-show-hide-focusing' of https://github.com/cerner/…
adoroshk Jul 20, 2023
1be999d
bottom divided test with JAWS
adoroshk Jul 20, 2023
6ecb098
new approach testing
adoroshk Jul 20, 2023
94850b3
test case for long paragraph
adoroshk Jul 20, 2023
c68c5b5
no focus ref example for testing
adoroshk Jul 20, 2023
abc4eda
paragraph component, examples and docs updated
adoroshk Jul 24, 2023
936edf6
doc text update
adoroshk Jul 25, 2023
6c7525b
tabIndex moved to Paragraph, Link Show Hide example added
adoroshk Jul 25, 2023
6e47ea6
role back as it doesn't work without role
adoroshk Jul 25, 2023
7b4be27
check if Paragraph incorporates p resolves the problem with JAWS
adoroshk Jul 25, 2023
8a4a7f9
p incorporation reverted, paragraph max length experiment
adoroshk Jul 25, 2023
74096b1
paragraph snapshots added
adoroshk Jul 25, 2023
d49e829
docs and tests updates
adoroshk Jul 25, 2023
ec0f3e7
check if <p> fixes JAWS confusion in <li>
adoroshk Jul 25, 2023
0156351
Doc text fixes and <p> reverted
adoroshk Jul 25, 2023
c605fd9
test if active container is the reason of JAWS confusion
adoroshk Jul 25, 2023
1835ec8
check if problem is specific to <li> element
adoroshk Jul 26, 2023
b29f4c6
id and aria-controls added
adoroshk Jul 26, 2023
cc85388
test if display fixes jaws confusion
adoroshk Jul 26, 2023
e77057f
test short sentences in li
adoroshk Jul 26, 2023
4357670
test li with display block
adoroshk Jul 26, 2023
ca05167
multiple children example added
adoroshk Jul 26, 2023
7181971
Paragrahp renamed to be focuser, examples and docs updated
adoroshk Jul 27, 2023
85736f7
text edits
adoroshk Jul 28, 2023
0db375b
wording change
adoroshk Jul 28, 2023
e8c4f6d
button accessible, no focusRef description removed
adoroshk Jul 28, 2023
e894289
Update packages/terra-core-docs/src/terra-dev-site/doc/show-hide/Abou…
adoroshk Jul 28, 2023
d341177
Update packages/terra-core-docs/src/terra-dev-site/doc/show-hide/Abou…
adoroshk Jul 28, 2023
d662383
Update packages/terra-core-docs/src/terra-dev-site/doc/show-hide/Abou…
adoroshk Jul 28, 2023
00d860f
Update packages/terra-core-docs/src/terra-dev-site/doc/show-hide/Abou…
adoroshk Jul 28, 2023
9ca3ff7
Update packages/terra-core-docs/src/terra-dev-site/doc/show-hide/Abou…
adoroshk Jul 28, 2023
7d0d3fb
Update packages/terra-core-docs/src/terra-dev-site/doc/show-hide/Abou…
adoroshk Jul 28, 2023
09d4e45
h4 changed to h3, typo fix
adoroshk Jul 28, 2023
eb4d10d
tabindex for button reverted, prop required fix
adoroshk Jul 28, 2023
0d1dbe5
fixes button being not accessible with VO Down Arrow
adoroshk Jul 29, 2023
11668ab
revert removing user-select property untill future investigation
adoroshk Jul 31, 2023
0986b97
Merge branch 'main' into terra-show-hide-focusing
adoroshk Jul 31, 2023
ef2f17d
id for focus ref added, test if helps avoid VO confusion
adoroshk Jul 31, 2023
35bfc7e
Merge branch 'terra-show-hide-focusing' of https://github.com/cerner/…
adoroshk Jul 31, 2023
fff0ad2
test list example
adoroshk Aug 1, 2023
877b70a
list example test with p
adoroshk Aug 1, 2023
eecfd9a
list example removed, caution placeholder
adoroshk Aug 1, 2023
a742c20
Merge branch 'main' into terra-show-hide-focusing
adoroshk Aug 2, 2023
f7d993c
Focuser renamed to ShowHideFocuser
adoroshk Aug 2, 2023
a616917
documentation update
adoroshk Aug 4, 2023
fce63fe
Update docs with suggested wording
adoroshk Aug 9, 2023
1813b07
comment to example added
adoroshk Aug 9, 2023
67dcc73
typo fix
adoroshk Aug 9, 2023
c8f17c0
str renamed, prop description fixed
adoroshk Aug 11, 2023
8493e05
Merge branch 'main' into terra-show-hide-focusing
adoroshk Aug 11, 2023
aa41c4b
uuid version and mock reset changed
adoroshk Aug 11, 2023
a47b7a6
doc edits
adoroshk Aug 11, 2023
2e998eb
test update for noPreview change
adoroshk Aug 11, 2023
822fe03
index file added for exports
adoroshk Aug 11, 2023
41cac25
index jsx changed to js
adoroshk Aug 11, 2023
6ad93a1
comment to explain the id added to focusable span
adoroshk Aug 11, 2023
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
5 changes: 3 additions & 2 deletions packages/terra-core-docs/CHANGELOG.md
adoroshk marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Changelog

## Unreleased

* Added
* Added documentation updates for `Single Select` in `terra-form-select`.

## Unreleased
* Added `focusRef` prop in `terra-show-hide`.

## 1.29.0 - (June 28, 2023)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Badge } from 'terra-show-hide/package.json?dev-site-package';
import { Notice } from "@cerner/terra-docs";

import DefaultShowHide from './example/DefaultShowHide?dev-site-example';
import CustomButtonTextShowHide from './example/CustomButtonTextShowHide?dev-site-example';
Expand Down Expand Up @@ -45,6 +46,19 @@ The Show-Hide component must be composed inside the [Base][1] component with a l
import ShowHide from 'terra-show-hide';
```

## Accessibility
Copy link
Contributor

@smason0 smason0 Jul 28, 2023

Choose a reason for hiding this comment

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

Wonder if this section would be better placed after the "Examples" section that explains the basic usage.

Edit: Nvm I see we have it this way in the "Alert" component page.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you, I am also not sure where to place that block. We might want to re-visit that question after the rest of documentation is approved.


<Notice variant="important" ariaLevel="3">

- In order for the component to be accessible, the `ref` to the first hidden child node have to be provided to the `focusRef` prop. The element will get focus once the full content revealed, that allows the assistive technologies to start reading the hidden content from the place where it was cut off.
- While the back compatibility has been preserved and the `focusRef` prop is not required, it is highly reccomended to provide that prop for the best user experience.

</Notice>

#### Accessibility Guidance.
- For the child component being a single paragraph `<p>`, wrap the portion of the text that is about to be hidden, in `<span>` tag, and pass a `ref` to that element as `focusRef` prop.
- For multiple children, pass a `ref` to the first child that is not included in preview portion as `focusRef` prop.

## Component Features

* [Cross-Browser Support](https://engineering.cerner.com/terra-ui/about/terra-ui/component-standards#cross-browser-support)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import React from 'react';
import ShowHide from 'terra-show-hide';

const fullText = 'According to the Journal of Healthcare Management/American College of Healthcare Executives, a 500-bed hospital loses over $4 million annually due to clinical communication inefficiencies. A unified clinical communication strategy can help health systems begin to close the gap and improve efficiency at every level. Enable your clinical care team with real-time health communication tools and workflows that help them to collaborate more effectively on the go and provide a quality patient care experience. A unified strategy and improved communication tools can help address many challenges including identification of patient care team members, mobile clinical workflows, secure and timely critical alerts, and more.';
const previewText = fullText.substring(0, 280);
const previewText = 'According to the Journal of Healthcare Management/American College of Healthcare Executives, a 500-bed hospital loses over $4 million annually due to clinical communication inefficiencies. A unified clinical communication strategy can help health systems begin to close the gap ';
const text = 'and improve efficiency at every level. Enable your clinical care team with real-time health communication tools and workflows that help them to collaborate more effectively on the go and provide a quality patient care experience. A unified strategy and improved communication tools can help address many challenges including identification of patient care team members, mobile clinical workflows, secure and timely critical alerts, and more.';

class ButtonAlignCenterShowHide extends React.Component {
constructor(props) {
super(props);

this.state = { isOpen: false };
this.toggleShowHide = this.toggleShowHide.bind(this);
this.focusRef = React.createRef();
}

toggleShowHide() {
Expand All @@ -21,8 +22,11 @@ class ButtonAlignCenterShowHide extends React.Component {
render() {
return (
<div>
<ShowHide buttonAlign="center" preview={<p>{previewText}</p>} isOpen={this.state.isOpen} onChange={this.toggleShowHide}>
<p>{fullText}</p>
<ShowHide focusRef={this.focusRef} buttonAlign="center" preview={<p>{previewText}</p>} isOpen={this.state.isOpen} onChange={this.toggleShowHide}>
<p>
{ previewText }
<span ref={this.focusRef}>{ text }</span>
</p>
</ShowHide>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,17 @@ import React from 'react';
import ShowHide from 'terra-show-hide';

const sentences = [
<h3 key="sentence1">Key Benefits of Cerner Cardiovascular Solutions</h3>,
<p key="sentence2">Eliminates silos of information and the resulting inefficiencies with a unified EHR and cardiovascular system</p>,
<p key="sentence3">Creates efficient diagnostic workflows, image management and analysis</p>,
<p key="sentence4">Enhances clinical, financial and performance outcomes with comprehensive procedural documentation</p>,
<p key="sentence5">Promotes cardiac disease management through health maintenance protocols</p>,
// <p key="sentence6">Lorem ipsum dolor sit amet consectetur adipiscing elit.</p>,
// <p key="sentence7">Lorem ipsum dolor sit amet consectetur adipiscing elit.</p>,
// <p key="sentence8">Lorem ipsum dolor sit amet consectetur adipiscing elit.</p>,
// <p key="sentence9">Lorem ipsum dolor sit amet consectetur adipiscing elit.</p>
'Key Benefits of Cerner Cardiovascular Solutions',
'Eliminates silos of information and the resulting inefficiencies with a unified EHR and cardiovascular system',
'Creates efficient diagnostic workflows, image management and analysis',
'Enhances clinical, financial and performance outcomes with comprehensive procedural documentation',
'Promotes cardiac disease management through health maintenance protocols',
];

const preview = [
<h3 key="sentence1">{sentences[0]}</h3>,
<p key="sentence2">{sentences[1]}</p>,
<p key="sentence3">{sentences[2]}</p>,
];

class CustomButtonTextShowHide extends React.Component {
Expand All @@ -19,6 +21,7 @@ class CustomButtonTextShowHide extends React.Component {

this.state = { isOpen: false };
this.toggleShowHide = this.toggleShowHide.bind(this);
this.focusRef = React.createRef();
}

toggleShowHide() {
Expand All @@ -38,12 +41,15 @@ class CustomButtonTextShowHide extends React.Component {

return (
<ShowHide
preview={[sentences[0], sentences[1], sentences[2]]}
preview={preview}
onChange={this.toggleShowHide}
isOpen={this.state.isOpen}
buttonText={customText}
focusRef={this.focusRef}
>
{sentences}
{ preview }
<p ref={this.focusRef} key="sentence4">{sentences[3]}</p>
<p key="sentence5">{sentences[4]}</p>
</ShowHide>
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import React from 'react';
import ShowHide from 'terra-show-hide';

const fullText = 'Patients are requesting greater affordability and efficiency in healthcare. With procedures performed in an ambulatory surgery center costing up to 60% less compared to a hospital outpatient department (1), the demand for these facilities is increasing. In fact, the U.S. ambulatory surgery center market is expected to see a 6.9 % compound annual growth rate, reaching $33 billion by 2028. (2) Cerner understands the urgency to grow in the ambulatory surgery center market while continuing to deliver excellent care. Healthcare IT products can help improve clinician efficiency and patient outcomes, as well as enhance communication and data exchange between ambulatory surgery center providers and patients.';
const previewText = fullText.substring(0, 280);
const previewText = 'Patients are requesting greater affordability and efficiency in healthcare. With procedures performed in an ambulatory surgery center costing up to 60% less compared to a hospital outpatient department (1), the demand for these facilities is increasing. ';
const text = 'In fact, the U.S. ambulatory surgery center market is expected to see a 6.9 % compound annual growth rate, reaching $33 billion by 2028. (2) Cerner understands the urgency to grow in the ambulatory surgery center market while continuing to deliver excellent care. Healthcare IT products can help improve clinician efficiency and patient outcomes, as well as enhance communication and data exchange between ambulatory surgery center providers and patients.';

class DefaultShowHide extends React.Component {
constructor(props) {
super(props);

this.state = { isOpen: false };
this.toggleShowHide = this.toggleShowHide.bind(this);
this.focusRef = React.createRef();
}

toggleShowHide() {
Expand All @@ -21,8 +22,11 @@ class DefaultShowHide extends React.Component {
render() {
return (
<div>
<ShowHide preview={<p>{previewText}</p>} isOpen={this.state.isOpen} onChange={this.toggleShowHide}>
<p>{fullText}</p>
<ShowHide focusRef={this.focusRef} preview={<p>{previewText}</p>} isOpen={this.state.isOpen} onChange={this.toggleShowHide}>
<p>
{ previewText }
<span ref={this.focusRef}>{ text }</span>
</p>
</ShowHide>
</div>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import React from 'react';
import ShowHide from 'terra-show-hide';

const fullText = 'Cerner cardiovascular solutions are embedded within the EHR, allowing for a holistic patient record that includes: diagnostic activities, therapeutic interventions and follow-up regimens. Electrocardiogram (ECG) objects are digitized and accessed within the EHR providing physicians in your cardiology department the ability to receive and present ECG data in mere seconds after it is acquired. This eliminates the necessity for a separate ECG information system.';
const previewText = fullText.substring(0, 280);
const previewText = 'Cerner cardiovascular solutions are embedded within the EHR, allowing for a holistic patient record that includes: diagnostic activities, therapeutic interventions and follow-up regimens. Electrocardiogram (ECG) objects are digitized and accessed within the EHR providing physicians ';
const text = 'in your cardiology department the ability to receive and present ECG data in mere seconds after it is acquired. This eliminates the necessity for a separate ECG information system.';

class InitiallyOpenShowHide extends React.Component {
constructor(props) {
super(props);

this.state = { isOpen: true };
this.toggleShowHide = this.toggleShowHide.bind(this);
this.focusRef = React.createRef();
}

toggleShowHide() {
Expand All @@ -20,8 +21,11 @@ class InitiallyOpenShowHide extends React.Component {

render() {
return (
<ShowHide preview={<p>{previewText}</p>} isOpen={this.state.isOpen} onChange={this.toggleShowHide}>
<p>{fullText}</p>
<ShowHide focusRef={this.focusRef} preview={<p>{previewText}</p>} isOpen={this.state.isOpen} onChange={this.toggleShowHide}>
<p>
{ previewText }
<span ref={this.focusRef}>{ text }</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

is this intended change to use same ref for two different html elements.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The <span> node created on line 27 needs to be accessed in the <ShowHide> component in order to receive focus, so <ShowHide> is taking a focusRef prop, which will the reference to the <span>.

I understand that it's confusing as I don't use ref forwarding. The reason for that is following:

  • The ref variable and span node and both created at the same component;
  • The prop can have meaningful name, like focusRef;
  • The prop is not required.
    But I am open for suggestions.

</p>
</ShowHide>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class NoPreviewShowHide extends React.Component {

this.state = { isOpen: false };
this.toggleShowHide = this.toggleShowHide.bind(this);
this.focusRef = React.createRef();
}

toggleShowHide() {
Expand All @@ -19,8 +20,8 @@ class NoPreviewShowHide extends React.Component {

render() {
return (
<ShowHide isOpen={this.state.isOpen} onChange={this.toggleShowHide}>
<p>{fullText}</p>
<ShowHide focusRef={this.focusRef} isOpen={this.state.isOpen} onChange={this.toggleShowHide}>
<p ref={this.focusRef}>{fullText}</p>
</ShowHide>
);
}
Expand Down
3 changes: 3 additions & 0 deletions packages/terra-show-hide/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## Unreleased

* Added
* New focusRef prop to shift focus to upon revealing the hidden content for screen-reader users.
adoroshk marked this conversation as resolved.
Show resolved Hide resolved

## 2.60.0 - (April 27, 2023)

* Changed
Expand Down
43 changes: 40 additions & 3 deletions packages/terra-show-hide/src/ShowHide.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import PropTypes from 'prop-types';
import Toggle from 'terra-toggle';
import { injectIntl } from 'react-intl';
import classNames from 'classnames/bind';
import ThemeContext from 'terra-theme-context';
import styles from './ShowHide.module.scss';
import Button from './_ShowHideButton';

Expand Down Expand Up @@ -34,6 +35,12 @@ const propTypes = {
* Allows parent to toggle the component. True for open and false for close.
*/
isOpen: PropTypes.bool,
/**
* Ref to the first hidden child element. The element will get focus once the full content revealed. That allows the assistive technologies to start reading the hidden content from the place where it was cut off.
*/
adoroshk marked this conversation as resolved.
Show resolved Hide resolved
focusRef: PropTypes.shape({
current: PropTypes.element,
}),
/**
* Elements(s) that will be visible to the user when component is collapsed
*/
Expand All @@ -55,9 +62,34 @@ const ShowHide = (props) => {
preview,
intl,
isOpen,
focusRef,
...customProps
} = props;

const theme = React.useContext(ThemeContext);
const contentRef = React.useRef(null);
adoroshk marked this conversation as resolved.
Show resolved Hide resolved

/**
* Upon showing hidden content, add required attributes and set focus to the child element provided by focusRef,
* or the content container element, if focusRef wasn't provided.
*/
React.useEffect(() => {
if (isOpen) {
let element = null;
if (props.focusRef?.current) {
element = props.focusRef?.current;
} else if (contentRef?.current) {
element = contentRef?.current;
}
if (element) {
element.setAttribute('tabIndex', '-1');
element.setAttribute('data-focus-styles-enabled', isOpen);
element.setAttribute('role', 'group');
element.focus();
adoroshk marked this conversation as resolved.
Show resolved Hide resolved
}
}
}, [isOpen, props.focusRef, contentRef]);
adoroshk marked this conversation as resolved.
Show resolved Hide resolved

const buttonClassName = cx([
'show-hide',
'button',
Expand All @@ -78,9 +110,14 @@ const ShowHide = (props) => {
return (
<div {...customProps}>
{!isOpen && preview}
<Toggle isOpen={isOpen}>
{children}
</Toggle>
<div
className={cx(['show-hide', 'show-hide-content', theme.className])}
ref={contentRef}
>
<Toggle isOpen={isOpen}>
{children}
</Toggle>
</div>
<div className={cx('show-hide')}>
<Button
aria-expanded={isOpen}
Expand Down
16 changes: 16 additions & 0 deletions packages/terra-show-hide/src/ShowHide.module.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
// Themes
@import './clinical-lowlight-theme/ShowHide.module';
@import './orion-fusion-theme/ShowHide.module';

:local {
.show-hide {
display: flex;
Expand All @@ -14,4 +18,16 @@
.end {
margin-left: auto;
}

.show-hide-content[data-focus-styles-enabled='true']:focus {
outline: var(--terra-show-hide-focus-outline, 2px dashed #000);
outline-offset: var(--terra-show-hide-focus-outline-offset, 2px);
}

.show-hide-content {
[data-focus-styles-enabled='true']:focus {
outline: var(--terra-show-hide-focus-outline, 2px dashed #000);
outline-offset: var(--terra-show-hide-focus-outline-offset, 2px);
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like these style blocks can be combined. It is the same style.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch, at some point I was trying different styles and left it separated. Fixed here: 1058492

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:local {
.clinical-lowlight-theme {
--terra-show-hide-focus-outline: 2px dashed #c8cacb;
--terra-show-hide-focus-outline-offset: 2px;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
:local {
.orion-fusion-theme {
--terra-show-hide-focus-outline: 2px dashed #000;
--terra-show-hide-focus-outline-offset: 2px;
}
}
Loading