@gitlab/ui 113.2.2 → 113.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [113.2.3](https://gitlab.com/gitlab-org/gitlab-ui/compare/v113.2.2...v113.2.3) (2025-05-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **GlAlert:** remove assertive aria-live ([e0ba832](https://gitlab.com/gitlab-org/gitlab-ui/commit/e0ba8325912e055dba39bcf9544ed2b7159f56ce))
7
+
1
8
  ## [113.2.2](https://gitlab.com/gitlab-org/gitlab-ui/compare/v113.2.1...v113.2.2) (2025-05-01)
2
9
 
3
10
 
@@ -85,15 +85,18 @@ var script = {
85
85
  type: Boolean,
86
86
  required: false,
87
87
  default: false
88
+ },
89
+ // only set to 'assertive' if alert requires immediate user action, otherwise use a default value
90
+ politeness: {
91
+ type: String,
92
+ required: false,
93
+ default: 'polite',
94
+ validator(value) {
95
+ return ['off', 'polite', 'assertive'].includes(value);
96
+ }
88
97
  }
89
98
  },
90
99
  computed: {
91
- ariaLive() {
92
- if ([alertVariantOptions.danger, alertVariantOptions.warning].includes(this.variant)) {
93
- return 'assertive';
94
- }
95
- return 'polite';
96
- },
97
100
  role() {
98
101
  if ([alertVariantOptions.danger, alertVariantOptions.warning, alertVariantOptions.success].includes(this.variant)) {
99
102
  return 'alert';
@@ -189,7 +192,7 @@ var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=
189
192
  { 'gl-alert-not-dismissible': !_vm.dismissible },
190
193
  { 'gl-alert-no-icon': !_vm.showIcon },
191
194
  { 'gl-alert-has-title': !!_vm.title },
192
- _vm.variantClass ]},[(_vm.showIcon)?_c('div',{staticClass:"gl-alert-icon-container"},[_c('gl-icon',{staticClass:"gl-alert-icon",attrs:{"name":_vm.iconName}})],1):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-content",attrs:{"role":_vm.role,"aria-live":_vm.ariaLive}},[(_vm.title)?_c('h2',{staticClass:"gl-alert-title"},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-body"},[_vm._t("default")],2),_vm._v(" "),(_vm.shouldRenderActions)?_c('div',{staticClass:"gl-alert-actions"},[_vm._t("actions",function(){return _vm._l((_vm.actionButtons),function(actionButton,index){return _c('gl-button',_vm._g(_vm._b({key:index,staticClass:"gl-alert-action"},'gl-button',actionButton.attrs,false),actionButton.listeners),[_vm._v("\n "+_vm._s(actionButton.text)+"\n ")])})})],2):_vm._e()]),_vm._v(" "),(_vm.dismissible)?_c('close-button',{ref:"dismiss",staticClass:"gl-dismiss-btn",attrs:{"label":_vm.dismissLabel},on:{"click":_vm.onDismiss}}):_vm._e()],1)};
195
+ _vm.variantClass ]},[(_vm.showIcon)?_c('div',{staticClass:"gl-alert-icon-container"},[_c('gl-icon',{staticClass:"gl-alert-icon",attrs:{"name":_vm.iconName}})],1):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-content",attrs:{"role":_vm.role,"aria-live":_vm.politeness}},[(_vm.title)?_c('h2',{staticClass:"gl-alert-title"},[_vm._v(_vm._s(_vm.title))]):_vm._e(),_vm._v(" "),_c('div',{staticClass:"gl-alert-body"},[_vm._t("default")],2),_vm._v(" "),(_vm.shouldRenderActions)?_c('div',{staticClass:"gl-alert-actions"},[_vm._t("actions",function(){return _vm._l((_vm.actionButtons),function(actionButton,index){return _c('gl-button',_vm._g(_vm._b({key:index,staticClass:"gl-alert-action"},'gl-button',actionButton.attrs,false),actionButton.listeners),[_vm._v("\n "+_vm._s(actionButton.text)+"\n ")])})})],2):_vm._e()]),_vm._v(" "),(_vm.dismissible)?_c('close-button',{ref:"dismiss",staticClass:"gl-dismiss-btn",attrs:{"label":_vm.dismissLabel},on:{"click":_vm.onDismiss}}):_vm._e()],1)};
193
196
  var __vue_staticRenderFns__ = [];
194
197
 
195
198
  /* style */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "113.2.2",
3
+ "version": "113.2.3",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -90,15 +90,17 @@ export default {
90
90
  required: false,
91
91
  default: false,
92
92
  },
93
+ // only set to 'assertive' if alert requires immediate user action, otherwise use a default value
94
+ politeness: {
95
+ type: String,
96
+ required: false,
97
+ default: 'polite',
98
+ validator(value) {
99
+ return ['off', 'polite', 'assertive'].includes(value);
100
+ },
101
+ },
93
102
  },
94
103
  computed: {
95
- ariaLive() {
96
- if ([alertVariantOptions.danger, alertVariantOptions.warning].includes(this.variant)) {
97
- return 'assertive';
98
- }
99
-
100
- return 'polite';
101
- },
102
104
  role() {
103
105
  if (
104
106
  [
@@ -206,7 +208,7 @@ export default {
206
208
  <div v-if="showIcon" class="gl-alert-icon-container">
207
209
  <gl-icon :name="iconName" class="gl-alert-icon" />
208
210
  </div>
209
- <div class="gl-alert-content" :role="role" :aria-live="ariaLive">
211
+ <div class="gl-alert-content" :role="role" :aria-live="politeness">
210
212
  <h2 v-if="title" class="gl-alert-title">{{ title }}</h2>
211
213
 
212
214
  <div class="gl-alert-body">