File tree Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Expand file tree Collapse file tree 3 files changed +12
-10
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ " @primer/react " : minor
3
+ ---
4
+
5
+ fix(Pagination): Use anchor instead of button for disabled prev/next controls
Original file line number Diff line number Diff line change @@ -76,14 +76,11 @@ const Page = styled.a`
76
76
77
77
&[aria-disabled],
78
78
&[aria-disabled]:hover {
79
- color: ${ get ( 'colors.primer.fg.disabled' ) } ; // check
80
- cursor: default;
81
- background-color: transparent;
82
- border-color: transparent;
83
- font-size: inherit;
84
- font-family: inherit;
85
- padding-top: inherit;
86
- padding-bottom: inherit;
79
+ margin: 0 2px;
80
+
81
+ &:first-child {
82
+ margin-right: 6px;
83
+ }
87
84
}
88
85
89
86
&[aria-disabled],
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ export function buildComponentData(
148
148
key = 'page-prev'
149
149
content = 'Previous'
150
150
if ( page . disabled ) {
151
- Object . assign ( props , { as : 'button' , ' aria-disabled' : 'true' } )
151
+ Object . assign ( props , { ' aria-disabled' : 'true' , role : 'link '} )
152
152
} else {
153
153
Object . assign ( props , {
154
154
rel : 'prev' ,
@@ -163,7 +163,7 @@ export function buildComponentData(
163
163
key = 'page-next'
164
164
content = 'Next'
165
165
if ( page . disabled ) {
166
- Object . assign ( props , { as : 'button' , ' aria-disabled' : 'true' } )
166
+ Object . assign ( props , { ' aria-disabled' : 'true' , role : 'link '} )
167
167
} else {
168
168
Object . assign ( props , {
169
169
rel : 'next' ,
You can’t perform that action at this time.
0 commit comments