aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/src/main/js/apps/sessions
diff options
context:
space:
mode:
authorWouter Admiraal <wouter.admiraal@sonarsource.com>2022-08-24 17:40:37 +0200
committersonartech <sonartech@sonarsource.com>2022-08-29 20:02:53 +0000
commitc757692a0a8d02998bfd8839c2612e17011013a7 (patch)
treefe7bfbb93c5e2de91034487f92bdfecce8c9ae2f /server/sonar-web/src/main/js/apps/sessions
parent479f33aad4fdd0e294be2444fd95c8931768b036 (diff)
downloadsonarqube-c757692a0a8d02998bfd8839c2612e17011013a7.tar.gz
sonarqube-c757692a0a8d02998bfd8839c2612e17011013a7.zip
SONAR-16725 [891882] An icon lacks 3 to 1 contrast ratio
Diffstat (limited to 'server/sonar-web/src/main/js/apps/sessions')
-rw-r--r--server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx13
-rw-r--r--server/sonar-web/src/main/js/apps/sessions/components/__tests__/__snapshots__/LoginForm-test.tsx.snap8
2 files changed, 10 insertions, 11 deletions
diff --git a/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx b/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx
index aa137b6a5bb..c395c1f80d0 100644
--- a/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx
+++ b/server/sonar-web/src/main/js/apps/sessions/components/LoginForm.tsx
@@ -18,7 +18,7 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import * as React from 'react';
-import { SubmitButton } from '../../../components/controls/buttons';
+import { ButtonLink, SubmitButton } from '../../../components/controls/buttons';
import DeferredSpinner from '../../../components/ui/DeferredSpinner';
import { translate } from '../../../helpers/l10n';
import { getBaseUrl } from '../../../helpers/system';
@@ -59,8 +59,7 @@ export default class LoginForm extends React.PureComponent<Props, State> {
.then(this.stopLoading, this.stopLoading);
};
- handleMoreOptionsClick = (event: React.MouseEvent<HTMLAnchorElement>) => {
- event.preventDefault();
+ handleMoreOptionsClick = () => {
this.setState({ collapsed: false });
};
@@ -74,12 +73,12 @@ export default class LoginForm extends React.PureComponent<Props, State> {
if (this.state.collapsed) {
return (
<div className="text-center">
- <a
- className="small text-muted js-more-options"
- href="#"
+ <ButtonLink
+ aria-expanded={false}
+ className="small js-more-options"
onClick={this.handleMoreOptionsClick}>
{translate('login.more_options')}
- </a>
+ </ButtonLink>
</div>
);
}
diff --git a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/__snapshots__/LoginForm-test.tsx.snap b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/__snapshots__/LoginForm-test.tsx.snap
index d45b1952809..3d97ba42e31 100644
--- a/server/sonar-web/src/main/js/apps/sessions/components/__tests__/__snapshots__/LoginForm-test.tsx.snap
+++ b/server/sonar-web/src/main/js/apps/sessions/components/__tests__/__snapshots__/LoginForm-test.tsx.snap
@@ -4,13 +4,13 @@ exports[`expands more options 1`] = `
<div
className="text-center"
>
- <a
- className="small text-muted js-more-options"
- href="#"
+ <ButtonLink
+ aria-expanded={false}
+ className="small js-more-options"
onClick={[Function]}
>
login.more_options
- </a>
+ </ButtonLink>
</div>
`;