MCPcopy Create free account
hub / github.com/adobe/react-spectrum / removeVisible

Function removeVisible

packages/dev/docs/src/client.js:107–119  ·  view source on GitHub ↗
(isNotResponsive = false)

Source from the content-addressed store, hash-verified

105 let themeSwitcher = document.querySelector(`header.${docsStyle.pageHeader} > div:last-of-type`);
106
107 let removeVisible = (isNotResponsive = false) => {
108 setIsPressed(false);
109
110 if (nav.contains(document.activeElement) && !isNotResponsive) {
111 hamburgerButton.focus();
112 }
113
114 nav.classList.remove(docsStyle.visible);
115 main.removeAttribute('aria-hidden');
116 themeSwitcher.removeAttribute('aria-hidden');
117 themeSwitcher.querySelector('button').removeAttribute('tabindex');
118 nav.removeAttribute('tabindex');
119 };
120
121 /* collapse nav when underlying content is clicked */
122 let onClick = () => removeVisible();

Callers 3

onClickFunction · 0.85
onKeydownEscFunction · 0.85
mediaQueryTestFunction · 0.85

Calls 3

focusMethod · 0.80
removeAttributeMethod · 0.80
removeMethod · 0.65

Tested by

no test coverage detected