File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
packages/react-core/src/components/Progress Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -95,17 +95,15 @@ export const ProgressContainer: React.FunctionComponent<ProgressContainerProps>
9595 }
9696 } , [ tooltip ] ) ;
9797
98+ const _isTruncatedAndString = isTitleTruncated && typeof title === 'string' ;
9899 const Title = (
99100 < div
100- className = { css (
101- progressStyle . progressDescription ,
102- isTitleTruncated && typeof title === 'string' && progressStyle . modifiers . truncate
103- ) }
101+ className = { css ( progressStyle . progressDescription , _isTruncatedAndString && progressStyle . modifiers . truncate ) }
104102 id = { `${ parentId } -description` }
105- aria-hidden = " true"
106- onMouseEnter = { isTitleTruncated && typeof title === 'string' ? onFocus : null }
107- onFocus = { isTitleTruncated && typeof title === 'string' ? onFocus : null }
108- { ...( isTitleTruncated && typeof title === 'string' && { tabIndex : 0 } ) }
103+ aria-hidden = { _isTruncatedAndString ? null : ' true' }
104+ onMouseEnter = { _isTruncatedAndString ? onFocus : null }
105+ onFocus = { _isTruncatedAndString ? onFocus : null }
106+ { ...( _isTruncatedAndString && { tabIndex : 0 } ) }
109107 ref = { titleRef }
110108 >
111109 { title }
You can’t perform that action at this time.
0 commit comments