@@ -278,19 +278,28 @@ function axisTickKy(
278
278
...options
279
279
}
280
280
) {
281
- return axisMark ( vectorY , k , anchor , `${ k } -axis tick` , data , {
282
- strokeWidth,
283
- strokeLinecap,
284
- strokeLinejoin,
285
- facetAnchor,
286
- frameAnchor,
287
- y,
288
- ...options ,
289
- dx : anchor === "left" ? + dx - offset + + insetLeft : + dx + offset - insetRight ,
290
- anchor : "start" ,
291
- length : tickSize ,
292
- shape : anchor === "left" ? shapeTickLeft : shapeTickRight
293
- } ) ;
281
+ return axisMark (
282
+ vectorY ,
283
+ k ,
284
+ data ,
285
+ {
286
+ ariaLabel : `${ k } -axis tick` ,
287
+ ariaHidden : true
288
+ } ,
289
+ {
290
+ strokeWidth,
291
+ strokeLinecap,
292
+ strokeLinejoin,
293
+ facetAnchor,
294
+ frameAnchor,
295
+ y,
296
+ ...options ,
297
+ dx : anchor === "left" ? + dx - offset + + insetLeft : + dx + offset - insetRight ,
298
+ anchor : "start" ,
299
+ length : tickSize ,
300
+ shape : anchor === "left" ? shapeTickLeft : shapeTickRight
301
+ }
302
+ ) ;
294
303
}
295
304
296
305
function axisTickKx (
@@ -312,19 +321,28 @@ function axisTickKx(
312
321
...options
313
322
}
314
323
) {
315
- return axisMark ( vectorX , k , anchor , `${ k } -axis tick` , data , {
316
- strokeWidth,
317
- strokeLinejoin,
318
- strokeLinecap,
319
- facetAnchor,
320
- frameAnchor,
321
- x,
322
- ...options ,
323
- dy : anchor === "bottom" ? + dy - offset - insetBottom : + dy + offset + + insetTop ,
324
- anchor : "start" ,
325
- length : tickSize ,
326
- shape : anchor === "bottom" ? shapeTickBottom : shapeTickTop
327
- } ) ;
324
+ return axisMark (
325
+ vectorX ,
326
+ k ,
327
+ data ,
328
+ {
329
+ ariaLabel : `${ k } -axis tick` ,
330
+ ariaHidden : true
331
+ } ,
332
+ {
333
+ strokeWidth,
334
+ strokeLinejoin,
335
+ strokeLinecap,
336
+ facetAnchor,
337
+ frameAnchor,
338
+ x,
339
+ ...options ,
340
+ dy : anchor === "bottom" ? + dy - offset - insetBottom : + dy + offset + + insetTop ,
341
+ anchor : "start" ,
342
+ length : tickSize ,
343
+ shape : anchor === "bottom" ? shapeTickBottom : shapeTickTop
344
+ }
345
+ ) ;
328
346
}
329
347
330
348
function axisTextKy (
@@ -352,9 +370,8 @@ function axisTextKy(
352
370
return axisMark (
353
371
textY ,
354
372
k ,
355
- anchor ,
356
- `${ k } -axis tick label` ,
357
373
data ,
374
+ { ariaLabel : `${ k } -axis tick label` } ,
358
375
{
359
376
facetAnchor,
360
377
frameAnchor,
@@ -399,9 +416,8 @@ function axisTextKx(
399
416
return axisMark (
400
417
textX ,
401
418
k ,
402
- anchor ,
403
- `${ k } -axis tick label` ,
404
419
data ,
420
+ { ariaLabel : `${ k } -axis tick label` } ,
405
421
{
406
422
facetAnchor,
407
423
frameAnchor,
@@ -453,7 +469,7 @@ function gridKy(
453
469
...options
454
470
}
455
471
) {
456
- return axisMark ( ruleY , k , anchor , `${ k } -grid` , data , { y, x1, x2, ...gridDefaults ( options ) } ) ;
472
+ return axisMark ( ruleY , k , data , { ariaLabel : `${ k } -grid` , ariaHidden : true } , { y, x1, x2, ...gridDefaults ( options ) } ) ;
457
473
}
458
474
459
475
function gridKx (
@@ -468,7 +484,7 @@ function gridKx(
468
484
...options
469
485
}
470
486
) {
471
- return axisMark ( ruleX , k , anchor , `${ k } -grid` , data , { x, y1, y2, ...gridDefaults ( options ) } ) ;
487
+ return axisMark ( ruleX , k , data , { ariaLabel : `${ k } -grid` , ariaHidden : true } , { x, y1, y2, ...gridDefaults ( options ) } ) ;
472
488
}
473
489
474
490
function gridDefaults ( {
@@ -520,7 +536,7 @@ function labelOptions(
520
536
} ;
521
537
}
522
538
523
- function axisMark ( mark , k , anchor , ariaLabel , data , options , initialize ) {
539
+ function axisMark ( mark , k , data , properties , options , initialize ) {
524
540
let channels ;
525
541
526
542
function axisInitializer ( data , facets , _channels , scales , dimensions , context ) {
@@ -615,7 +631,7 @@ function axisMark(mark, k, anchor, ariaLabel, data, options, initialize) {
615
631
} else {
616
632
channels = { } ;
617
633
}
618
- m . ariaLabel = ariaLabel ;
634
+ if ( properties !== undefined ) Object . assign ( m , properties ) ;
619
635
if ( m . clip === undefined ) m . clip = false ; // don’t clip axes by default
620
636
return m ;
621
637
}
0 commit comments