feat: account creation flow done

updated some testids and aria labels, SessionInput now has aria label support
pull/3083/head
William Grant 11 months ago
parent 4507669961
commit 293a733806

@ -110,7 +110,9 @@ export const EmptyMessageView = () => {
{!conversationCount ? ( {!conversationCount ? (
<> <>
<StyledHR /> <StyledHR />
<StyledNoConversations>{window.i18n('conversationsNone')}</StyledNoConversations> <StyledNoConversations data-testid="empty-conversation">
{window.i18n('conversationsNone')}
</StyledNoConversations>
<SpacerXS /> <SpacerXS />
<StyledP style={{ width: '360px' }}>{window.i18n('onboardingHitThePlusButton')}</StyledP> <StyledP style={{ width: '360px' }}>{window.i18n('onboardingHitThePlusButton')}</StyledP>
</> </>

@ -147,6 +147,7 @@ const StyledTextAreaContainer = styled(motion.div)<{
const ErrorItem = (props: { id: string; error: string }) => { const ErrorItem = (props: { id: string; error: string }) => {
return ( return (
<motion.label <motion.label
aria-label="Error message"
htmlFor={props.id} htmlFor={props.id}
className={'filled error'} className={'filled error'}
initial={{ opacity: 0 }} initial={{ opacity: 0 }}
@ -181,6 +182,7 @@ const ShowHideButton = (props: {
iconSize="huge" iconSize="huge"
onClick={props.toggleForceShow} onClick={props.toggleForceShow}
style={style} style={style}
aria-label={'Show or hide input'}
dataTestId="reveal-recovery-phrase-toggle" dataTestId="reveal-recovery-phrase-toggle"
/> />
); );
@ -207,6 +209,7 @@ type Props = {
type?: string; type?: string;
value?: string; value?: string;
placeholder?: string; placeholder?: string;
ariaLabel?: string;
maxLength?: number; maxLength?: number;
enableShowHide?: boolean; enableShowHide?: boolean;
onValueChanged?: (value: string) => any; onValueChanged?: (value: string) => any;
@ -232,6 +235,7 @@ export const SessionInput = (props: Props) => {
placeholder, placeholder,
type = 'text', type = 'text',
value, value,
ariaLabel,
maxLength, maxLength,
enableShowHide, enableShowHide,
error, error,
@ -346,10 +350,14 @@ export const SessionInput = (props: Props) => {
> >
{isTextArea ? ( {isTextArea ? (
<StyledTextAreaContainer {...containerProps}> <StyledTextAreaContainer {...containerProps}>
<textarea {...inputProps} /> <textarea {...inputProps} aria-label={ariaLabel || 'session input text area'} />
</StyledTextAreaContainer> </StyledTextAreaContainer>
) : ( ) : (
<StyledInput {...inputProps} {...containerProps} /> <StyledInput
{...inputProps}
{...containerProps}
aria-label={ariaLabel || 'session input'}
/>
)} )}
{editable && enableShowHide && ( {editable && enableShowHide && (
<ShowHideButton <ShowHideButton

@ -120,6 +120,7 @@ export const LeftPaneBanner = () => {
<p>{window.i18n('saveRecoveryPasswordDescription')}</p> <p>{window.i18n('saveRecoveryPasswordDescription')}</p>
<SpacerMD /> <SpacerMD />
<SessionButton <SessionButton
ariaLabel="Reveal recovery phrase button"
text={window.i18n('continue')} text={window.i18n('continue')}
onClick={showRecoveryPhraseModal} onClick={showRecoveryPhraseModal}
dataTestId="reveal-recovery-phrase" dataTestId="reveal-recovery-phrase"

@ -52,7 +52,7 @@ export const RegistrationStages = () => {
</div> </div>
<Flex container={true} alignItems="center"> <Flex container={true} alignItems="center">
<SessionIconButton <SessionIconButton
aria-label="external link to Session FAQ web page" ariaLabel="FAQ Link"
iconType="question" iconType="question"
iconSize={'medium'} iconSize={'medium'}
iconPadding="4px" iconPadding="4px"
@ -66,7 +66,7 @@ export const RegistrationStages = () => {
/> />
<SpacerSM /> <SpacerSM />
<SessionIconButton <SessionIconButton
aria-label="external link to Session website" ariaLabel="Session website link"
iconType="link" iconType="link"
iconSize="medium" iconSize="medium"
iconColor="var(--text-primary-color)" iconColor="var(--text-primary-color)"

@ -128,6 +128,7 @@ export const CreateAccount = () => {
<OnboardDescription>{window.i18n('displayNameDescription')}</OnboardDescription> <OnboardDescription>{window.i18n('displayNameDescription')}</OnboardDescription>
<SpacerLG /> <SpacerLG />
<SessionInput <SessionInput
ariaLabel={'Enter display name'}
autoFocus={true} autoFocus={true}
disableOnBlurEvent={true} disableOnBlurEvent={true}
type="text" type="text"
@ -143,6 +144,7 @@ export const CreateAccount = () => {
/> />
<SpacerLG /> <SpacerLG />
<SessionButton <SessionButton
ariaLabel="Continue"
buttonColor={SessionButtonColor.White} buttonColor={SessionButtonColor.White}
onClick={signUpWithDetails} onClick={signUpWithDetails}
text={window.i18n('continue')} text={window.i18n('continue')}

@ -43,6 +43,7 @@ export const Start = () => {
return ( return (
<StyledStart ready={ready}> <StyledStart ready={ready}>
<SessionButton <SessionButton
ariaLabel={'Create account button'}
buttonColor={SessionButtonColor.White} buttonColor={SessionButtonColor.White}
onClick={() => { onClick={() => {
dispatch(setDirection('forward')); dispatch(setDirection('forward'));
@ -54,6 +55,7 @@ export const Start = () => {
/> />
<SpacerLG /> <SpacerLG />
<SessionButton <SessionButton
ariaLabel={'Restore your session button'}
buttonColor={SessionButtonColor.White} buttonColor={SessionButtonColor.White}
onClick={() => { onClick={() => {
dispatch(setDirection('forward')); dispatch(setDirection('forward'));

Loading…
Cancel
Save