]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-11688 Make Help menu accessible
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Thu, 20 Jun 2019 13:32:16 +0000 (15:32 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 28 Jun 2019 06:45:44 +0000 (08:45 +0200)
server/sonar-web/src/main/js/app/components/embed-docs-modal/EmbedDocsPopupHelper.tsx

index 6334e7b492291d2a9669acac785be7ead39038f7..be13e9494ef6db7625fe6f7be32500a4fa8d25c6 100644 (file)
@@ -18,6 +18,7 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
+import { ButtonLink } from '../../../components/ui/buttons';
 import Toggler from '../../../components/controls/Toggler';
 import HelpIcon from '../../../components/icons-components/HelpIcon';
 import { lazyLoad } from '../../../components/lazyLoad';
@@ -55,9 +56,7 @@ export default class EmbedDocsPopupHelper extends React.PureComponent<{}, State>
     this.setState({ helpOpen });
   };
 
-  handleClick = (event: React.MouseEvent<HTMLAnchorElement>) => {
-    event.preventDefault();
-    event.currentTarget.blur();
+  handleClick = () => {
     this.toggleHelp();
   };
 
@@ -78,13 +77,14 @@ export default class EmbedDocsPopupHelper extends React.PureComponent<{}, State>
           onRequestClose={this.closeHelp}
           open={this.state.helpOpen}
           overlay={<EmbedDocsPopup onClose={this.closeHelp} />}>
-          <a
+          <ButtonLink
+            aria-expanded={this.state.helpOpen}
+            aria-haspopup={true}
             className="navbar-help navbar-icon"
-            href="#"
             onClick={this.handleClick}
             title={translate('help')}>
             <HelpIcon />
-          </a>
+          </ButtonLink>
         </Toggler>
       </li>
     );