File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
react/src/components/CodeSnippet
styles/scss/components/code-snippet Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -226,10 +226,14 @@ function CodeSnippet({
226
226
< div { ...rest } className = { codeSnippetClasses } >
227
227
< div
228
228
ref = { codeContainerRef }
229
- role = { type === 'single' ? 'textbox' : null }
230
- tabIndex = { type === 'single' && ! disabled ? 0 : null }
229
+ role = { type === 'single' || type === 'multi' ? 'textbox' : null }
230
+ tabIndex = {
231
+ ( type === 'single' || type === 'multi' ) && ! disabled ? 0 : null
232
+ }
231
233
className = { `${ prefix } --snippet-container` }
232
234
aria-label = { ariaLabel || 'code-snippet' }
235
+ aria-readonly = { type === 'single' || type === 'multi' ? true : null }
236
+ aria-multiline = { type === 'multi' ? true : null }
233
237
onScroll = { ( type === 'single' && handleScroll ) || null }
234
238
{ ...containerStyle } >
235
239
< pre
Original file line number Diff line number Diff line change @@ -201,6 +201,12 @@ $copy-btn-feedback: $background-inverse !default;
201
201
order : 1 ;
202
202
overflow-y : auto ;
203
203
transition : max-height $duration-moderate-01 motion (standard , productive );
204
+
205
+ & :focus {
206
+ @include focus-outline (' outline' );
207
+
208
+ outline-offset : 0 ;
209
+ }
204
210
}
205
211
206
212
// expanded snippet container
You can’t perform that action at this time.
0 commit comments