@progress/kendo-react-inputs 5.5.1-dev.202207252139 → 5.6.0-dev.202208040930

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.
@@ -91,6 +91,10 @@ export interface SliderProps extends FormComponentProps {
91
91
  * Identifies the element(s) which will label the component.
92
92
  */
93
93
  ariaLabelledBy?: string;
94
+ /**
95
+ * The accessible label of the component.
96
+ */
97
+ ariaLabel?: string;
94
98
  dir?: Direction;
95
99
  }
96
100
  /**
@@ -115,6 +119,7 @@ export declare class SliderWithoutContext extends React.Component<SliderProps, S
115
119
  id: PropTypes.Requireable<string>;
116
120
  ariaLabelledBy: PropTypes.Requireable<string>;
117
121
  ariaDescribedBy: PropTypes.Requireable<string>;
122
+ ariaLabel: PropTypes.Requireable<string>;
118
123
  };
119
124
  /**
120
125
  * @hidden
@@ -179,7 +179,7 @@ var SliderWithoutContext = /** @class */ (function (_super) {
179
179
  var sliderItemsStyle = this.props.vertical
180
180
  ? { paddingTop: 0, height: '100%' }
181
181
  : {};
182
- return (React.createElement("div", { ref: function (el) { return _this._element = el; }, "aria-valuemin": this.props.min, "aria-valuemax": this.props.max, "aria-valuenow": this.state.value, "aria-disabled": this.props.disabled ? 'true' : undefined, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, dir: this.state.dir, role: "slider", id: this.props.id, style: __assign({ gap: 0 }, this.props.style), tabIndex: (0, kendo_react_common_1.getTabIndex)(this.props.tabIndex, this.props.disabled, undefined), onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, className: (0, kendo_react_common_1.classNames)('k-slider k-widget', {
182
+ return (React.createElement("div", { ref: function (el) { return _this._element = el; }, dir: this.state.dir, id: this.props.id, style: __assign({ gap: 0 }, this.props.style), onFocus: this.onFocus, onBlur: this.onBlur, onKeyDown: this.onKeyDown, className: (0, kendo_react_common_1.classNames)('k-slider k-widget', {
183
183
  'k-focus': this.state.focused,
184
184
  'k-disabled': this.props.disabled,
185
185
  'k-slider-horizontal': !this.props.vertical,
@@ -201,7 +201,7 @@ var SliderWithoutContext = /** @class */ (function (_super) {
201
201
  React.createElement("div", { className: "k-slider-selection", style: this.props.vertical
202
202
  ? { height: percentValue + '%' }
203
203
  : { width: percentValue + '%' } }),
204
- React.createElement("a", { className: "k-draghandle", title: lS.toLanguageString(messages_1.sliderDragTitle, messages_1.messages[messages_1.sliderDragTitle]), style: this.props.vertical
204
+ React.createElement("span", { role: "slider", "aria-valuemin": this.props.min, "aria-valuemax": this.props.max, "aria-valuenow": this.state.value, "aria-valuetext": String(this.state.value), "aria-orientation": this.props.vertical ? 'vertical' : undefined, "aria-disabled": this.props.disabled ? 'true' : undefined, "aria-labelledby": this.props.ariaLabelledBy, "aria-describedby": this.props.ariaDescribedBy, "aria-label": this.props.ariaLabel, tabIndex: (0, kendo_react_common_1.getTabIndex)(this.props.tabIndex, this.props.disabled, undefined), className: "k-draghandle", title: lS.toLanguageString(messages_1.sliderDragTitle, messages_1.messages[messages_1.sliderDragTitle]), style: this.props.vertical
205
205
  ? { bottom: 'calc(' + percentValue + '%)', zIndex: 1 }
206
206
  : this.state.dir === 'rtl' ? { right: 'calc(' + percentValue + '% - 13px)', zIndex: 1 }
207
207
  : { left: 'calc(' + percentValue + '%)', zIndex: 1 } })))))));
@@ -232,7 +232,8 @@ var SliderWithoutContext = /** @class */ (function (_super) {
232
232
  vertical: PropTypes.bool,
233
233
  id: PropTypes.string,
234
234
  ariaLabelledBy: PropTypes.string,
235
- ariaDescribedBy: PropTypes.string
235
+ ariaDescribedBy: PropTypes.string,
236
+ ariaLabel: PropTypes.string
236
237
  // TODO: validation when buttons is set to true, but no step is provided
237
238
  };
238
239
  return SliderWithoutContext;
@@ -29,7 +29,7 @@ var SliderLabel = function (props) {
29
29
  ? { bottom: "".concat(props.position, "%") }
30
30
  : (_a = {}, _a[dir === 'rtl' ? 'right' : 'left'] = "".concat(props.position, "%"), _a);
31
31
  var tickStyle = props.vertical ? 'k-tick-vertical' : 'k-tick-horizontal';
32
- return (React.createElement("li", { ref: sliderLabelRef, role: "presentation", className: "k-tick k-tick-large ".concat(tickStyle), title: props.title, style: __assign({ zIndex: 1, position: 'absolute' }, style) },
32
+ return (React.createElement("li", { ref: sliderLabelRef, className: "k-tick k-tick-large ".concat(tickStyle), title: props.title, style: __assign({ zIndex: 1, position: 'absolute' }, style) },
33
33
  React.createElement("span", __assign({}, (_b = {}, _b[exports.SLIDER_LABEL_ATTRIBUTE] = true, _b), { className: "k-label", onClick: props.onClick }), props.children)));
34
34
  };
35
35
  exports.SliderLabel = SliderLabel;