on master help sign in
fix: html5 input props updated for a11y
91176c2Matt Condon (shrugs)
src/form/Inputs.js+23−4
@@ -41,6 +41,9 @@ export function TicketInput({ name, ...rest }) {
41 type="password"
41 type="password"
42 name={name}
42 name={name}
43 placeholder={PLACEHOLDER_TICKET}
43 placeholder={PLACEHOLDER_TICKET}
44+ autoCapitalize="none"
45+ autoComplete="off"
46+ autoCorrect="off"
44 accessory={
47 accessory={
45 touched && !active && error ? (
48 touched && !active && error ? (
46 <AccessoryIcon.Failure />
49 <AccessoryIcon.Failure />
@@ -59,7 +62,14 @@ export function TicketInput({ name, ...rest }) {
59
62
60export function MnemonicInput({ ...rest }) {
63export function MnemonicInput({ ...rest }) {
61 return (
64 return (
65+ <Input
66+ type="textarea"
62− <Input type="textarea" placeholder={PLACEHOLDER_MNEMONIC} mono {...rest} />
67+ placeholder={PLACEHOLDER_MNEMONIC}
68+ autoCapitalize="none"
69+ autoComplete="off"
70+ mono
71+ {...rest}
72+ />
63 );
73 );
64}
74}
65
75
@@ -68,7 +78,9 @@ export function HdPathInput({ ...rest }) {
68 <Input
78 <Input
69 type="text"
79 type="text"
70 placeholder={PLACEHOLDER_HD_PATH}
80 placeholder={PLACEHOLDER_HD_PATH}
81+ autoCapitalize="none"
71 autoComplete="off"
82 autoComplete="off"
83+ autoCorrect="off"
72 {...rest}
84 {...rest}
73 />
85 />
74 );
86 );
@@ -79,7 +91,9 @@ export function PassphraseInput({ ...rest }) {
79 <Input
91 <Input
80 type="password"
92 type="password"
81 placeholder="Passphrase"
93 placeholder="Passphrase"
94+ autoCapitalize="none"
82 autoComplete="off"
95 autoComplete="off"
96+ autoCorrect="off"
83 {...rest}
97 {...rest}
84 />
98 />
85 );
99 );
@@ -99,6 +113,9 @@ export function PointInput({ name, size = 4, ...rest }) {
99 label="Point"
113 label="Point"
100 name={name}
114 name={name}
101 placeholder={PLACEHOLDER_POINT}
115 placeholder={PLACEHOLDER_POINT}
116+ autoCapitalize="none"
117+ autoComplete="off"
118+ autoCorrect="off"
102 accessory={
119 accessory={
103 value ? (
120 value ? (
104 <InputSigil
121 <InputSigil
@@ -122,7 +139,9 @@ export function HexInput({ ...rest }) {
122 <Input
139 <Input
123 type="text"
140 type="text"
124 placeholder={PLACEHOLDER_PRIVATE_KEY}
141 placeholder={PLACEHOLDER_PRIVATE_KEY}
142+ autoCapitalize="none"
125 autoComplete="off"
143 autoComplete="off"
144+ autoCorrect="off"
126 mono
145 mono
127 {...rest}
146 {...rest}
128 />
147 />
@@ -134,7 +153,8 @@ export function AddressInput({ ...rest }) {
134 <Input
153 <Input
135 type="text"
154 type="text"
136 placeholder={PLACEHOLDER_ADDRESS}
155 placeholder={PLACEHOLDER_ADDRESS}
137− autoComplete="off"
156+ autoCapitalize="none"
157+ autoCorrect="off"
138 mono
158 mono
139 {...rest}
159 {...rest}
140 />
160 />
@@ -146,7 +166,6 @@ export function NumberInput({ ...rest }) {
146 <Input
166 <Input
147 type="number"
167 type="number"
148 label="Number"
168 label="Number"
149− autoComplete="off"
150 config={{ format: convertToNumber }}
169 config={{ format: convertToNumber }}
151 {...rest}
170 {...rest}
152 />
171 />
@@ -158,7 +177,7 @@ export function EmailInput({ ...rest }) {
158 <Input
177 <Input
159 type="email"
178 type="email"
160 placeholder={PLACEHOLDER_EMAIL}
179 placeholder={PLACEHOLDER_EMAIL}
161− autoComplete="off"
180+ autoCapitalize="none"
162 {...rest}
181 {...rest}
163 />
182 />
164 );
183 );