Skip to content

Commit d7bd15e

Browse files
committed
Merge branch 'master' into 6.0
2 parents fc17cd0 + be1270e commit d7bd15e

File tree

8 files changed

+85
-3
lines changed

8 files changed

+85
-3
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: ''
6+
assignees: i-like-robots
7+
8+
---
9+
10+
Your issue may already be reported! Please search on the [issue tracker](../) before creating one.
11+
12+
## Expected behaviour
13+
14+
A clear and concise description of what the bug is.
15+
16+
## Current behaviour
17+
18+
A clear and concise description of what you expected to happen.
19+
20+
## Steps to Reproduce
21+
22+
Steps to reproduce the problem:
23+
24+
1.
25+
2.
26+
3.
27+
4.
28+
29+
## Example and screenshots
30+
31+
Please add a link to a minimal reproducible example of the bug if you have created one.
32+
33+
## Screenshots
34+
35+
If applicable, add screenshots to help explain your problem.
36+
37+
## Your environment
38+
39+
- OS: [e.g. Windows 10]
40+
- Browser: [e.g. chrome 76, safari 12]
41+
- Version of the component: [e.g. 5.11.2]
42+
- React version: [e.g. 16.12]
43+
44+
## Additional context
45+
46+
Add any other useful context about the problem here.
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## Describe the solution you'd like
11+
12+
A clear and concise description of what you want to happen.
13+
14+
## Describe alternatives you've considered
15+
16+
A clear and concise description of any alternative solutions or features you've considered.
17+
18+
## Additional context
19+
20+
Add any other context or screenshots about the feature request here.

.npmignore

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
.git/
2+
.github/
3+
.nyc_output/
14
coverage/
25
example/
36
lib/

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
- Added ES6 package and `"module"` entry point
99
- Added `id` option to configure the component ID
1010
- Added `removeButtonText` option to configure the selected tag remove button title attribute
11+
- Refactored `ariaLabel` option to `ariaLabelText` to match other text options
1112
- Refactored `placeholder` option to `placeholderText` to match other text options
1213
- Refactored keyboard event handlers to use `KeyboardEvent.key`
1314
- Refactored event handlers and callbacks to use `on` prefixes
@@ -20,6 +21,10 @@
2021
- Removed `delimiterChars` option
2122
- Updated React dependency to 16.5+
2223

24+
## 5.13.0
25+
26+
- Added `ariaLabel` option ([Herdismaria](https://github.com/Herdismaria))
27+
2328
## 5.12.1
2429

2530
- Fixed an issue where the `componentDidUpdate()` callback of the input component can be called too many times

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ ReactDOM.render(<App />, document.getElementById('app'))
8282
- [`suggestions`](#suggestions-optional)
8383
- [`suggestionsFilter`](#suggestionsfilter-optional)
8484
- [`placeholderText`](#placeholdertext-optional)
85+
- [`ariaLabelText`](#arialabeltext-optional)
8586
- [`removeButtonText`](#removeButtontext-optional)
8687
- [`noSuggestionsText`](#noSuggestionsText-optional)
8788
- [`autoresize`](#autoresize-optional)
@@ -139,6 +140,10 @@ If no function is supplied the default filter is applied. Defaults to `null`.
139140

140141
The placeholder string shown for the input. Defaults to `'Add new tag'`.
141142

143+
#### ariaLabelText (optional)
144+
145+
The aria-label string for the input. Defaults to placeholder string.
146+
142147
#### removeButtonText (optional)
143148

144149
The title text to add to the remove selected tag button. Default `'Click to remove tag'`.

lib/Input.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class Input extends React.Component {
6363
}
6464

6565
render () {
66-
const { id, query, placeholderText, expanded, classNames, inputAttributes, inputEventHandlers, index } = this.props
66+
const { id, query, ariaLabelText, placeholderText, expanded, classNames, inputAttributes, inputEventHandlers, index } = this.props
6767

6868
return (
6969
<div className={classNames.searchWrapper}>
@@ -76,7 +76,7 @@ class Input extends React.Component {
7676
className={classNames.searchInput}
7777
role='combobox'
7878
aria-autocomplete='list'
79-
aria-label={placeholderText}
79+
aria-label={ariaLabelText || placeholderText}
8080
aria-owns={id}
8181
aria-activedescendant={index > -1 ? `${id}-${index}` : null}
8282
aria-expanded={expanded}

lib/ReactTags.js

+2
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,7 @@ class ReactTags extends React.Component {
244244
autoresize={this.props.autoresize}
245245
expanded={expanded}
246246
placeholderText={this.props.placeholderText}
247+
ariaLabelText={this.props.ariaLabelText}
247248
/>
248249
<Suggestions
249250
{...this.state}
@@ -285,6 +286,7 @@ ReactTags.propTypes = {
285286
id: PropTypes.string,
286287
tags: PropTypes.arrayOf(PropTypes.object),
287288
placeholderText: PropTypes.string,
289+
ariaLabelText: PropTypes.string,
288290
removeButtonText: PropTypes.string,
289291
noSuggestionsText: PropTypes.string,
290292
suggestions: PropTypes.arrayOf(PropTypes.object),

package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@
3434
"Andrew Pillsbury",
3535
"Axel Niklasson",
3636
"Serhiy Yefremenko",
37-
"Paul Shannon"
37+
"Paul Shannon",
38+
"Herdis Maria"
3839
],
3940
"license": "MIT",
4041
"repository": "https://github.com/i-like-robots/react-tags",

0 commit comments

Comments
 (0)