terra-form-select
Advanced tools
Comparing version 6.53.1 to 6.54.0
@@ -5,2 +5,7 @@ # Changelog | ||
## 6.54.0 - (January 9, 2024) | ||
* Changed | ||
* Reverted changes to announce selected state in `native-select`. | ||
## 6.53.1 - (January 4, 2024) | ||
@@ -7,0 +12,0 @@ |
@@ -220,29 +220,5 @@ "use strict"; | ||
} | ||
var groupHeading = options.filter(function (groupValue) { | ||
return groupValue.options; | ||
}).find(function (element) { | ||
return element.options.find(function (childElement) { | ||
return childElement.value === currentValue; | ||
}); | ||
}); | ||
var selectedText = intl.formatMessage({ | ||
id: 'Terra.form.select.selected' | ||
}); | ||
var displayText; | ||
if (currentValue) { | ||
if (groupHeading) { | ||
displayText = intl.formatMessage({ | ||
id: 'Terra.form.select.optGroup' | ||
}, { | ||
text: "".concat(groupHeading.display, ", ").concat(ariaLabel, ", ").concat(selectedText) | ||
}); | ||
} else { | ||
displayText = "".concat(ariaLabel, ", ").concat(selectedText); | ||
} | ||
} else { | ||
displayText = ariaLabel; | ||
} | ||
var selectAttrs = { | ||
'aria-describedby': ariaDescribedBy, | ||
'aria-label': displayText, | ||
'aria-label': ariaLabel, | ||
id: id, | ||
@@ -249,0 +225,0 @@ disabled: disabled, |
{ | ||
"name": "terra-form-select", | ||
"version": "6.53.1", | ||
"version": "6.54.0", | ||
"description": "Provides a drop down of selectable options.", | ||
@@ -56,3 +56,3 @@ "author": "Cerner Corporation", | ||
}, | ||
"gitHead": "2fe31561dddebb8d049ab13c99bbde377ba2305c" | ||
"gitHead": "11a2f3a121e9701433769d213d55bda871139935" | ||
} |
@@ -219,19 +219,5 @@ import React, { | ||
} | ||
const groupHeading = options.filter(groupValue => (groupValue.options)).find(element => element.options.find(childElement => childElement.value === currentValue)); | ||
const selectedText = intl.formatMessage({ id: 'Terra.form.select.selected' }); | ||
let displayText; | ||
if (currentValue) { | ||
if (groupHeading) { | ||
displayText = intl.formatMessage({ id: 'Terra.form.select.optGroup' }, { text: `${groupHeading.display}, ${ariaLabel}, ${selectedText}` }); | ||
} else { | ||
displayText = `${ariaLabel}, ${selectedText}`; | ||
} | ||
} else { | ||
displayText = ariaLabel; | ||
} | ||
const selectAttrs = { | ||
'aria-describedby': ariaDescribedBy, | ||
'aria-label': displayText, | ||
'aria-label': ariaLabel, | ||
id, | ||
@@ -238,0 +224,0 @@ disabled, |
1239351
26628