Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: include #global-status id in DOM #824

Merged
merged 1 commit into from
May 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,7 @@ export default class GlobalStatus extends React.PureComponent {
status_anchor_text,
skeleton,

id, // eslint-disable-line
id,
item, // eslint-disable-line
items, // eslint-disable-line
autoclose, // eslint-disable-line
Expand All @@ -647,6 +647,7 @@ export default class GlobalStatus extends React.PureComponent {
} = props

const wrapperParams = {
id,
key: 'global-status',
className: classnames(
'dnb-global-status__wrapper',
Expand All @@ -661,13 +662,6 @@ export default class GlobalStatus extends React.PureComponent {
tabIndex: '-1'
}

// if (!isActive) {
// // because of screen readers will else read the content on page load, if:
// // 1. if "show" is true from beginning, then we never come here
// // to make sure we double check that situation
// return <div {...wrapperParams} />
// }

const state = this.correctStatus(rawState)
const iconToRender = GlobalStatus.getIcon({
state,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,7 @@ exports[`GlobalStatus snapshot have to match component snapshot 1`] = `
<div
aria-live="assertive"
className="dnb-global-status__wrapper dnb-no-focus className class"
id="main"
key="global-status"
onKeyDown={[Function]}
tabIndex="-1"
Expand Down Expand Up @@ -1092,6 +1093,7 @@ Array [
<div
aria-live="assertive"
className="dnb-global-status__wrapper dnb-no-focus"
id="linked"
key="global-status"
onKeyDown={[Function]}
tabIndex="-1"
Expand Down