Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore(pagination): change role="none presentation" to role="presentation" (closes #2921) #3993

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/components/pagination/pagination.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ describe('pagination', () => {

lis.wrappers.forEach((li, index) => {
expect(li.classes()).toContain('page-item')
expect(li.attributes('role')).toContain('none')
expect(li.attributes('role')).toContain('presentation')
const pageLink = li.find('.page-link')
expect(pageLink).toBeDefined()
if (index === 2) {
Expand Down Expand Up @@ -462,8 +460,6 @@ describe('pagination', () => {
// Grab the page buttons (includes bookends)
wrapper.findAll('li').wrappers.forEach((li, index) => {
expect(li.classes()).toContain('page-item')
expect(li.attributes('role')).toContain('none')
expect(li.attributes('role')).toContain('presentation')
if (index === 0) {
// First button
expect(li.classes()).toContain('disabled')
Expand Down Expand Up @@ -501,8 +497,6 @@ describe('pagination', () => {
// Grab the page buttons (including bookends)
wrapper.findAll('li').wrappers.forEach((li, index) => {
expect(li.classes()).toContain('page-item')
expect(li.attributes('role')).toContain('none')
expect(li.attributes('role')).toContain('presentation')
if (index === 0) {
// First button
expect(li.classes()).not.toContain('disabled')
Expand Down Expand Up @@ -540,8 +534,6 @@ describe('pagination', () => {
// Grab the page buttons (including bookends)
wrapper.findAll('li').wrappers.forEach((li, index) => {
expect(li.classes()).toContain('page-item')
expect(li.attributes('role')).toContain('none')
expect(li.attributes('role')).toContain('presentation')
// Page number buttons
if (index >= 2 && index <= 5) {
// Pages 1 to 4
Expand Down
4 changes: 2 additions & 2 deletions src/mixins/pagination.js
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ export default {
staticClass: 'page-item',
class: { disabled: isDisabled, 'flex-fill': fill },
attrs: {
role: 'none presentation',
role: 'presentation',
'aria-hidden': isDisabled ? 'true' : null
}
},
Expand Down Expand Up @@ -492,7 +492,7 @@ export default {
key: `page-${page.number}`,
staticClass: 'page-item',
class: [{ disabled, active, 'flex-fill': fill }, page.classes],
attrs: { role: 'none presentation' }
attrs: { role: 'presentation' }
},
[inner]
)
Expand Down