@marko/language-server 1.3.0 → 1.3.1

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.
package/dist/index.mjs CHANGED
@@ -302,505 +302,530 @@ import { JSDOM } from "jsdom";
302
302
  // src/service/html/axe-rules/axe-rules.ts
303
303
  var keyboard = {
304
304
  /**
305
- * - Ensures every accesskey attribute value is unique
306
- * - accesskey attribute value should be unique ([url](https://dequeuniversity.com/rules/axe/4.7/accesskeys?application=axeAPI))
305
+ * - Ensure every accesskey attribute value is unique
306
+ * - accesskey attribute value should be unique ([url](https://dequeuniversity.com/rules/axe/4.10/accesskeys?application=axeAPI))
307
307
  */
308
308
  accesskeys: "accesskeys",
309
309
  /**
310
- * - Ensures each page has at least one mechanism for a user to bypass navigation and jump straight to the content
311
- * - Page must have means to bypass repeated blocks ([url](https://dequeuniversity.com/rules/axe/4.7/bypass?application=axeAPI))
310
+ * - Ensure each page has at least one mechanism for a user to bypass navigation and jump straight to the content
311
+ * - Page must have means to bypass repeated blocks ([url](https://dequeuniversity.com/rules/axe/4.10/bypass?application=axeAPI))
312
312
  */
313
313
  bypass: "bypass",
314
314
  /**
315
- * - Ensures elements in the focus order have a role appropriate for interactive content
316
- * - Elements in the focus order should have an appropriate role ([url](https://dequeuniversity.com/rules/axe/4.7/focus-order-semantics?application=axeAPI))
315
+ * - Ensure elements in the focus order have a role appropriate for interactive content
316
+ * - Elements in the focus order should have an appropriate role ([url](https://dequeuniversity.com/rules/axe/4.10/focus-order-semantics?application=axeAPI))
317
317
  */
318
318
  focusOrderSemantics: "focus-order-semantics",
319
319
  /**
320
- * - Ensures `<frame>` and `<iframe>` elements with focusable content do not have tabindex=-1
321
- * - Frames with focusable content must not have tabindex=-1 ([url](https://dequeuniversity.com/rules/axe/4.7/frame-focusable-content?application=axeAPI))
320
+ * - Ensure `<frame>` and `<iframe>` elements with focusable content do not have tabindex=-1
321
+ * - Frames with focusable content must not have tabindex=-1 ([url](https://dequeuniversity.com/rules/axe/4.10/frame-focusable-content?application=axeAPI))
322
322
  */
323
323
  frameFocusableContent: "frame-focusable-content",
324
324
  /**
325
- * - Ensures interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologies
326
- * - Interactive controls must not be nested ([url](https://dequeuniversity.com/rules/axe/4.7/nested-interactive?application=axeAPI))
325
+ * - Ensure interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologies
326
+ * - Interactive controls must not be nested ([url](https://dequeuniversity.com/rules/axe/4.10/nested-interactive?application=axeAPI))
327
327
  */
328
328
  nestedInteractive: "nested-interactive",
329
329
  /**
330
- * - Ensures all page content is contained by landmarks
331
- * - All page content should be contained by landmarks ([url](https://dequeuniversity.com/rules/axe/4.7/region?application=axeAPI))
330
+ * - Ensure all page content is contained by landmarks
331
+ * - All page content should be contained by landmarks ([url](https://dequeuniversity.com/rules/axe/4.10/region?application=axeAPI))
332
332
  */
333
333
  region: "region",
334
334
  /**
335
335
  * - Ensure elements that have scrollable content are accessible by keyboard
336
- * - Scrollable region must have keyboard access ([url](https://dequeuniversity.com/rules/axe/4.7/scrollable-region-focusable?application=axeAPI))
336
+ * - Scrollable region must have keyboard access ([url](https://dequeuniversity.com/rules/axe/4.10/scrollable-region-focusable?application=axeAPI))
337
337
  */
338
338
  scrollableRegionFocusable: "scrollable-region-focusable",
339
339
  /**
340
340
  * - Ensure all skip links have a focusable target
341
- * - The skip-link target should exist and be focusable ([url](https://dequeuniversity.com/rules/axe/4.7/skip-link?application=axeAPI))
341
+ * - The skip-link target should exist and be focusable ([url](https://dequeuniversity.com/rules/axe/4.10/skip-link?application=axeAPI))
342
342
  */
343
343
  skipLink: "skip-link",
344
344
  /**
345
- * - Ensures tabindex attribute values are not greater than 0
346
- * - Elements should not have tabindex greater than zero ([url](https://dequeuniversity.com/rules/axe/4.7/tabindex?application=axeAPI))
345
+ * - Ensure tabindex attribute values are not greater than 0
346
+ * - Elements should not have tabindex greater than zero ([url](https://dequeuniversity.com/rules/axe/4.10/tabindex?application=axeAPI))
347
347
  */
348
348
  tabindex: "tabindex"
349
349
  };
350
350
  var textAlternatives = {
351
351
  /**
352
- * - Ensures `<area>` elements of image maps have alternate text
353
- * - Active `<area>` elements must have alternate text ([url](https://dequeuniversity.com/rules/axe/4.7/area-alt?application=axeAPI))
352
+ * - Ensure `<area>` elements of image maps have alternate text
353
+ * - Active `<area>` elements must have alternate text ([url](https://dequeuniversity.com/rules/axe/4.10/area-alt?application=axeAPI))
354
354
  */
355
355
  areaAlt: "area-alt",
356
356
  /**
357
- * - Ensures each HTML document contains a non-empty `<title>` element
358
- * - Documents must have `<title>` element to aid in navigation ([url](https://dequeuniversity.com/rules/axe/4.7/document-title?application=axeAPI))
357
+ * - Ensure each HTML document contains a non-empty `<title>` element
358
+ * - Documents must have `<title>` element to aid in navigation ([url](https://dequeuniversity.com/rules/axe/4.10/document-title?application=axeAPI))
359
359
  */
360
360
  documentTitle: "document-title",
361
361
  /**
362
- * - Ensures `<iframe>` and `<frame>` elements contain a unique title attribute
363
- * - Frames must have a unique title attribute ([url](https://dequeuniversity.com/rules/axe/4.7/frame-title-unique?application=axeAPI))
362
+ * - Ensure `<iframe>` and `<frame>` elements contain a unique title attribute
363
+ * - Frames must have a unique title attribute ([url](https://dequeuniversity.com/rules/axe/4.10/frame-title-unique?application=axeAPI))
364
364
  */
365
365
  frameTitleUnique: "frame-title-unique",
366
366
  /**
367
- * - Ensures `<iframe>` and `<frame>` elements have an accessible name
368
- * - Frames must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.7/frame-title?application=axeAPI))
367
+ * - Ensure `<iframe>` and `<frame>` elements have an accessible name
368
+ * - Frames must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/frame-title?application=axeAPI))
369
369
  */
370
370
  frameTitle: "frame-title",
371
371
  /**
372
- * - Ensures `<img>` elements have alternate text or a role of none or presentation
373
- * - Images must have alternate text ([url](https://dequeuniversity.com/rules/axe/4.7/image-alt?application=axeAPI))
372
+ * - Ensure `<img>` elements have alternate text or a role of none or presentation
373
+ * - Images must have alternate text ([url](https://dequeuniversity.com/rules/axe/4.10/image-alt?application=axeAPI))
374
374
  */
375
375
  imageAlt: "image-alt",
376
376
  /**
377
377
  * - Ensure image alternative is not repeated as text
378
- * - Alternative text of images should not be repeated as text ([url](https://dequeuniversity.com/rules/axe/4.7/image-redundant-alt?application=axeAPI))
378
+ * - Alternative text of images should not be repeated as text ([url](https://dequeuniversity.com/rules/axe/4.10/image-redundant-alt?application=axeAPI))
379
379
  */
380
380
  imageRedundantAlt: "image-redundant-alt",
381
381
  /**
382
- * - Ensures `<input type="image">` elements have alternate text
383
- * - Image buttons must have alternate text ([url](https://dequeuniversity.com/rules/axe/4.7/input-image-alt?application=axeAPI))
382
+ * - Ensure `<input type="image">` elements have alternate text
383
+ * - Image buttons must have alternate text ([url](https://dequeuniversity.com/rules/axe/4.10/input-image-alt?application=axeAPI))
384
384
  */
385
385
  inputImageAlt: "input-image-alt",
386
386
  /**
387
- * - Ensures `<object>` elements have alternate text
388
- * - `<object>` elements must have alternate text ([url](https://dequeuniversity.com/rules/axe/4.7/object-alt?application=axeAPI))
387
+ * - Ensure `<object>` elements have alternate text
388
+ * - `<object>` elements must have alternate text ([url](https://dequeuniversity.com/rules/axe/4.10/object-alt?application=axeAPI))
389
389
  */
390
390
  objectAlt: "object-alt",
391
391
  /**
392
- * - Ensures [role='img'] elements have alternate text
393
- * - [role='img'] elements must have an alternative text ([url](https://dequeuniversity.com/rules/axe/4.7/role-img-alt?application=axeAPI))
392
+ * - Ensure [role="img"] elements have alternate text
393
+ * - [role="img"] elements must have an alternative text ([url](https://dequeuniversity.com/rules/axe/4.10/role-img-alt?application=axeAPI))
394
394
  */
395
395
  roleImgAlt: "role-img-alt",
396
396
  /**
397
- * - Ensures that server-side image maps are not used
398
- * - Server-side image maps must not be used ([url](https://dequeuniversity.com/rules/axe/4.7/server-side-image-map?application=axeAPI))
397
+ * - Ensure that server-side image maps are not used
398
+ * - Server-side image maps must not be used ([url](https://dequeuniversity.com/rules/axe/4.10/server-side-image-map?application=axeAPI))
399
399
  */
400
400
  serverSideImageMap: "server-side-image-map",
401
401
  /**
402
- * - Ensures `<svg>` elements with an img, graphics-document or graphics-symbol role have an accessible text
403
- * - `<svg>` elements with an img role must have an alternative text ([url](https://dequeuniversity.com/rules/axe/4.7/svg-img-alt?application=axeAPI))
402
+ * - Ensure `<svg>` elements with an img, graphics-document or graphics-symbol role have an accessible text
403
+ * - `<svg>` elements with an img role must have an alternative text ([url](https://dequeuniversity.com/rules/axe/4.10/svg-img-alt?application=axeAPI))
404
404
  */
405
405
  svgImgAlt: "svg-img-alt",
406
406
  /**
407
- * - Ensures `<video>` elements have captions
408
- * - `<video>` elements must have captions ([url](https://dequeuniversity.com/rules/axe/4.7/video-caption?application=axeAPI))
407
+ * - Ensure `<video>` elements have captions
408
+ * - `<video>` elements must have captions ([url](https://dequeuniversity.com/rules/axe/4.10/video-caption?application=axeAPI))
409
409
  */
410
410
  videoCaption: "video-caption"
411
411
  };
412
412
  var aria = {
413
413
  /**
414
- * - Ensures ARIA attributes are allowed for an element's role
415
- * - Elements must only use allowed ARIA attributes ([url](https://dequeuniversity.com/rules/axe/4.7/aria-allowed-attr?application=axeAPI))
414
+ * - Ensure an element's role supports its ARIA attributes
415
+ * - Elements must only use supported ARIA attributes ([url](https://dequeuniversity.com/rules/axe/4.10/aria-allowed-attr?application=axeAPI))
416
416
  */
417
417
  ariaAllowedAttr: "aria-allowed-attr",
418
418
  /**
419
- * - Ensures role attribute has an appropriate value for the element
420
- * - ARIA role should be appropriate for the element ([url](https://dequeuniversity.com/rules/axe/4.7/aria-allowed-role?application=axeAPI))
419
+ * - Ensure role attribute has an appropriate value for the element
420
+ * - ARIA role should be appropriate for the element ([url](https://dequeuniversity.com/rules/axe/4.10/aria-allowed-role?application=axeAPI))
421
421
  */
422
422
  ariaAllowedRole: "aria-allowed-role",
423
423
  /**
424
- * - Ensures every ARIA button, link and menuitem has an accessible name
425
- * - ARIA commands must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.7/aria-command-name?application=axeAPI))
424
+ * - Ensure aria-braillelabel and aria-brailleroledescription have a non-braille equivalent
425
+ * - aria-braille attributes must have a non-braille equivalent ([url](https://dequeuniversity.com/rules/axe/4.10/aria-braille-equivalent?application=axeAPI))
426
+ */
427
+ ariaBrailleEquivalent: "aria-braille-equivalent",
428
+ /**
429
+ * - Ensure every ARIA button, link and menuitem has an accessible name
430
+ * - ARIA commands must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/aria-command-name?application=axeAPI))
426
431
  */
427
432
  ariaCommandName: "aria-command-name",
428
433
  /**
429
- * - Ensures every ARIA dialog and alertdialog node has an accessible name
430
- * - ARIA dialog and alertdialog nodes should have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.7/aria-dialog-name?application=axeAPI))
434
+ * - Ensure ARIA attributes are used as described in the specification of the element's role
435
+ * - ARIA attributes must be used as specified for the element's role ([url](https://dequeuniversity.com/rules/axe/4.10/aria-conditional-attr?application=axeAPI))
436
+ */
437
+ ariaConditionalAttr: "aria-conditional-attr",
438
+ /**
439
+ * - Ensure elements do not use deprecated roles
440
+ * - Deprecated ARIA roles must not be used ([url](https://dequeuniversity.com/rules/axe/4.10/aria-deprecated-role?application=axeAPI))
441
+ */
442
+ ariaDeprecatedRole: "aria-deprecated-role",
443
+ /**
444
+ * - Ensure every ARIA dialog and alertdialog node has an accessible name
445
+ * - ARIA dialog and alertdialog nodes should have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/aria-dialog-name?application=axeAPI))
431
446
  */
432
447
  ariaDialogName: "aria-dialog-name",
433
448
  /**
434
- * - Ensures aria-hidden='true' is not present on the document body.
435
- * - aria-hidden='true' must not be present on the document body ([url](https://dequeuniversity.com/rules/axe/4.7/aria-hidden-body?application=axeAPI))
449
+ * - Ensure aria-hidden="true" is not present on the document body.
450
+ * - aria-hidden="true" must not be present on the document body ([url](https://dequeuniversity.com/rules/axe/4.10/aria-hidden-body?application=axeAPI))
436
451
  */
437
452
  ariaHiddenBody: "aria-hidden-body",
438
453
  /**
439
- * - Ensures every ARIA input field has an accessible name
440
- * - ARIA input fields must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.7/aria-input-field-name?application=axeAPI))
454
+ * - Ensure every ARIA input field has an accessible name
455
+ * - ARIA input fields must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/aria-input-field-name?application=axeAPI))
441
456
  */
442
457
  ariaInputFieldName: "aria-input-field-name",
443
458
  /**
444
- * - Ensures every ARIA meter node has an accessible name
445
- * - ARIA meter nodes must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.7/aria-meter-name?application=axeAPI))
459
+ * - Ensure every ARIA meter node has an accessible name
460
+ * - ARIA meter nodes must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/aria-meter-name?application=axeAPI))
446
461
  */
447
462
  ariaMeterName: "aria-meter-name",
448
463
  /**
449
- * - Ensures every ARIA progressbar node has an accessible name
450
- * - ARIA progressbar nodes must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.7/aria-progressbar-name?application=axeAPI))
464
+ * - Ensure every ARIA progressbar node has an accessible name
465
+ * - ARIA progressbar nodes must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/aria-progressbar-name?application=axeAPI))
451
466
  */
452
467
  ariaProgressbarName: "aria-progressbar-name",
453
468
  /**
454
- * - Ensures elements with ARIA roles have all required ARIA attributes
455
- * - Required ARIA attributes must be provided ([url](https://dequeuniversity.com/rules/axe/4.7/aria-required-attr?application=axeAPI))
469
+ * - Ensure ARIA attributes are not prohibited for an element's role
470
+ * - Elements must only use permitted ARIA attributes ([url](https://dequeuniversity.com/rules/axe/4.10/aria-prohibited-attr?application=axeAPI))
471
+ */
472
+ ariaProhibitedAttr: "aria-prohibited-attr",
473
+ /**
474
+ * - Ensure elements with ARIA roles have all required ARIA attributes
475
+ * - Required ARIA attributes must be provided ([url](https://dequeuniversity.com/rules/axe/4.10/aria-required-attr?application=axeAPI))
456
476
  */
457
477
  ariaRequiredAttr: "aria-required-attr",
458
478
  /**
459
- * - Ensures elements with an ARIA role that require child roles contain them
460
- * - Certain ARIA roles must contain particular children ([url](https://dequeuniversity.com/rules/axe/4.7/aria-required-children?application=axeAPI))
479
+ * - Ensure elements with an ARIA role that require child roles contain them
480
+ * - Certain ARIA roles must contain particular children ([url](https://dequeuniversity.com/rules/axe/4.10/aria-required-children?application=axeAPI))
461
481
  */
462
482
  ariaRequiredChildren: "aria-required-children",
463
483
  /**
464
- * - Ensures elements with an ARIA role that require parent roles are contained by them
465
- * - Certain ARIA roles must be contained by particular parents ([url](https://dequeuniversity.com/rules/axe/4.7/aria-required-parent?application=axeAPI))
484
+ * - Ensure elements with an ARIA role that require parent roles are contained by them
485
+ * - Certain ARIA roles must be contained by particular parents ([url](https://dequeuniversity.com/rules/axe/4.10/aria-required-parent?application=axeAPI))
466
486
  */
467
487
  ariaRequiredParent: "aria-required-parent",
468
488
  /**
469
489
  * - Ensure aria-roledescription is only used on elements with an implicit or explicit role
470
- * - aria-roledescription must be on elements with a semantic role ([url](https://dequeuniversity.com/rules/axe/4.7/aria-roledescription?application=axeAPI))
490
+ * - aria-roledescription must be on elements with a semantic role ([url](https://dequeuniversity.com/rules/axe/4.10/aria-roledescription?application=axeAPI))
471
491
  */
472
492
  ariaRoledescription: "aria-roledescription",
473
493
  /**
474
- * - Ensures all elements with a role attribute use a valid value
475
- * - ARIA roles used must conform to valid values ([url](https://dequeuniversity.com/rules/axe/4.7/aria-roles?application=axeAPI))
494
+ * - Ensure all elements with a role attribute use a valid value
495
+ * - ARIA roles used must conform to valid values ([url](https://dequeuniversity.com/rules/axe/4.10/aria-roles?application=axeAPI))
476
496
  */
477
497
  ariaRoles: "aria-roles",
478
498
  /**
479
- * - Ensures "role=text" is used on elements with no focusable descendants
480
- * - "role=text" should have no focusable descendants ([url](https://dequeuniversity.com/rules/axe/4.7/aria-text?application=axeAPI))
499
+ * - Ensure role="text" is used on elements with no focusable descendants
500
+ * - "role=text" should have no focusable descendants ([url](https://dequeuniversity.com/rules/axe/4.10/aria-text?application=axeAPI))
481
501
  */
482
502
  ariaText: "aria-text",
483
503
  /**
484
- * - Ensures every ARIA toggle field has an accessible name
485
- * - ARIA toggle fields must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.7/aria-toggle-field-name?application=axeAPI))
504
+ * - Ensure every ARIA toggle field has an accessible name
505
+ * - ARIA toggle fields must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/aria-toggle-field-name?application=axeAPI))
486
506
  */
487
507
  ariaToggleFieldName: "aria-toggle-field-name",
488
508
  /**
489
- * - Ensures every ARIA tooltip node has an accessible name
490
- * - ARIA tooltip nodes must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.7/aria-tooltip-name?application=axeAPI))
509
+ * - Ensure every ARIA tooltip node has an accessible name
510
+ * - ARIA tooltip nodes must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/aria-tooltip-name?application=axeAPI))
491
511
  */
492
512
  ariaTooltipName: "aria-tooltip-name",
493
513
  /**
494
- * - Ensures every ARIA treeitem node has an accessible name
495
- * - ARIA treeitem nodes should have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.7/aria-treeitem-name?application=axeAPI))
514
+ * - Ensure every ARIA treeitem node has an accessible name
515
+ * - ARIA treeitem nodes should have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/aria-treeitem-name?application=axeAPI))
496
516
  */
497
517
  ariaTreeitemName: "aria-treeitem-name",
498
518
  /**
499
- * - Ensures all ARIA attributes have valid values
500
- * - ARIA attributes must conform to valid values ([url](https://dequeuniversity.com/rules/axe/4.7/aria-valid-attr-value?application=axeAPI))
519
+ * - Ensure all ARIA attributes have valid values
520
+ * - ARIA attributes must conform to valid values ([url](https://dequeuniversity.com/rules/axe/4.10/aria-valid-attr-value?application=axeAPI))
501
521
  */
502
522
  ariaValidAttrValue: "aria-valid-attr-value",
503
523
  /**
504
- * - Ensures attributes that begin with aria- are valid ARIA attributes
505
- * - ARIA attributes must conform to valid names ([url](https://dequeuniversity.com/rules/axe/4.7/aria-valid-attr?application=axeAPI))
524
+ * - Ensure attributes that begin with aria- are valid ARIA attributes
525
+ * - ARIA attributes must conform to valid names ([url](https://dequeuniversity.com/rules/axe/4.10/aria-valid-attr?application=axeAPI))
506
526
  */
507
527
  ariaValidAttr: "aria-valid-attr",
508
528
  /**
509
529
  * - Elements marked as presentational should not have global ARIA or tabindex to ensure all screen readers ignore them
510
- * - Ensure elements marked as presentational are consistently ignored ([url](https://dequeuniversity.com/rules/axe/4.7/presentation-role-conflict?application=axeAPI))
530
+ * - Ensure elements marked as presentational are consistently ignored ([url](https://dequeuniversity.com/rules/axe/4.10/presentation-role-conflict?application=axeAPI))
511
531
  */
512
532
  presentationRoleConflict: "presentation-role-conflict"
513
533
  };
514
534
  var nameRoleValue = {
515
535
  /**
516
- * - Ensures aria-hidden elements are not focusable nor contain focusable elements
517
- * - ARIA hidden element must not be focusable or contain focusable elements ([url](https://dequeuniversity.com/rules/axe/4.7/aria-hidden-focus?application=axeAPI))
536
+ * - Ensure aria-hidden elements are not focusable nor contain focusable elements
537
+ * - ARIA hidden element must not be focusable or contain focusable elements ([url](https://dequeuniversity.com/rules/axe/4.10/aria-hidden-focus?application=axeAPI))
518
538
  */
519
539
  ariaHiddenFocus: "aria-hidden-focus",
520
540
  /**
521
- * - Ensures buttons have discernible text
522
- * - Buttons must have discernible text ([url](https://dequeuniversity.com/rules/axe/4.7/button-name?application=axeAPI))
541
+ * - Ensure buttons have discernible text
542
+ * - Buttons must have discernible text ([url](https://dequeuniversity.com/rules/axe/4.10/button-name?application=axeAPI))
523
543
  */
524
544
  buttonName: "button-name",
525
545
  /**
526
- * - Ensures headings have discernible text
527
- * - Headings should not be empty ([url](https://dequeuniversity.com/rules/axe/4.7/empty-heading?application=axeAPI))
546
+ * - Ensure headings have discernible text
547
+ * - Headings should not be empty ([url](https://dequeuniversity.com/rules/axe/4.10/empty-heading?application=axeAPI))
528
548
  */
529
549
  emptyHeading: "empty-heading",
530
550
  /**
531
- * - Ensures table headers have discernible text
532
- * - Table header text should not be empty ([url](https://dequeuniversity.com/rules/axe/4.7/empty-table-header?application=axeAPI))
551
+ * - Ensure table headers have discernible text
552
+ * - Table header text should not be empty ([url](https://dequeuniversity.com/rules/axe/4.10/empty-table-header?application=axeAPI))
533
553
  */
534
554
  emptyTableHeader: "empty-table-header",
535
555
  /**
536
- * - Ensures input buttons have discernible text
537
- * - Input buttons must have discernible text ([url](https://dequeuniversity.com/rules/axe/4.7/input-button-name?application=axeAPI))
556
+ * - Ensure input buttons have discernible text
557
+ * - Input buttons must have discernible text ([url](https://dequeuniversity.com/rules/axe/4.10/input-button-name?application=axeAPI))
538
558
  */
539
559
  inputButtonName: "input-button-name",
540
560
  /**
541
- * - Ensures links have discernible text
542
- * - Links must have discernible text ([url](https://dequeuniversity.com/rules/axe/4.7/link-name?application=axeAPI))
561
+ * - Ensure links have discernible text
562
+ * - Links must have discernible text ([url](https://dequeuniversity.com/rules/axe/4.10/link-name?application=axeAPI))
563
+ */
564
+ linkName: "link-name",
565
+ /**
566
+ * - Ensure summary elements have discernible text
567
+ * - Summary elements must have discernible text ([url](https://dequeuniversity.com/rules/axe/4.10/summary-name?application=axeAPI))
543
568
  */
544
- linkName: "link-name"
569
+ summaryName: "summary-name"
545
570
  };
546
571
  var timeAndMedia = {
547
572
  /**
548
- * - Ensures `<audio>` elements have captions
549
- * - `<audio>` elements must have a captions track ([url](https://dequeuniversity.com/rules/axe/4.7/audio-caption?application=axeAPI))
573
+ * - Ensure `<audio>` elements have captions
574
+ * - `<audio>` elements must have a captions track ([url](https://dequeuniversity.com/rules/axe/4.10/audio-caption?application=axeAPI))
550
575
  */
551
576
  audioCaption: "audio-caption",
552
577
  /**
553
- * - Ensures `<blink>` elements are not used
554
- * - `<blink>` elements are deprecated and must not be used ([url](https://dequeuniversity.com/rules/axe/4.7/blink?application=axeAPI))
578
+ * - Ensure `<blink>` elements are not used
579
+ * - `<blink>` elements are deprecated and must not be used ([url](https://dequeuniversity.com/rules/axe/4.10/blink?application=axeAPI))
555
580
  */
556
581
  blink: "blink",
557
582
  /**
558
- * - Ensures `<meta http-equiv="refresh">` is not used for delayed refresh
559
- * - Delayed refresh must not be used ([url](https://dequeuniversity.com/rules/axe/4.7/meta-refresh-no-exceptions?application=axeAPI))
583
+ * - Ensure `<meta http-equiv="refresh">` is not used for delayed refresh
584
+ * - Delayed refresh must not be used ([url](https://dequeuniversity.com/rules/axe/4.10/meta-refresh-no-exceptions?application=axeAPI))
560
585
  */
561
586
  metaRefreshNoExceptions: "meta-refresh-no-exceptions",
562
587
  /**
563
- * - Ensures `<meta http-equiv="refresh">` is not used for delayed refresh
564
- * - Delayed refresh under 20 hours must not be used ([url](https://dequeuniversity.com/rules/axe/4.7/meta-refresh?application=axeAPI))
588
+ * - Ensure `<meta http-equiv="refresh">` is not used for delayed refresh
589
+ * - Delayed refresh under 20 hours must not be used ([url](https://dequeuniversity.com/rules/axe/4.10/meta-refresh?application=axeAPI))
565
590
  */
566
591
  metaRefresh: "meta-refresh",
567
592
  /**
568
- * - Ensures `<video>` or `<audio>` elements do not autoplay audio for more than 3 seconds without a control mechanism to stop or mute the audio
569
- * - `<video>` or `<audio>` elements must not play automatically ([url](https://dequeuniversity.com/rules/axe/4.7/no-autoplay-audio?application=axeAPI))
593
+ * - Ensure `<video>` or `<audio>` elements do not autoplay audio for more than 3 seconds without a control mechanism to stop or mute the audio
594
+ * - `<video>` or `<audio>` elements must not play automatically ([url](https://dequeuniversity.com/rules/axe/4.10/no-autoplay-audio?application=axeAPI))
570
595
  */
571
596
  noAutoplayAudio: "no-autoplay-audio"
572
597
  };
573
598
  var forms = {
574
599
  /**
575
600
  * - Ensure the autocomplete attribute is correct and suitable for the form field
576
- * - autocomplete attribute must be used correctly ([url](https://dequeuniversity.com/rules/axe/4.7/autocomplete-valid?application=axeAPI))
601
+ * - autocomplete attribute must be used correctly ([url](https://dequeuniversity.com/rules/axe/4.10/autocomplete-valid?application=axeAPI))
577
602
  */
578
603
  autocompleteValid: "autocomplete-valid",
579
604
  /**
580
- * - Ensures form field does not have multiple label elements
581
- * - Form field must not have multiple label elements ([url](https://dequeuniversity.com/rules/axe/4.7/form-field-multiple-labels?application=axeAPI))
605
+ * - Ensure form field does not have multiple label elements
606
+ * - Form field must not have multiple label elements ([url](https://dequeuniversity.com/rules/axe/4.10/form-field-multiple-labels?application=axeAPI))
582
607
  */
583
608
  formFieldMultipleLabels: "form-field-multiple-labels",
584
609
  /**
585
- * - Ensures that every form element has a visible label and is not solely labeled using hidden labels, or the title or aria-describedby attributes
586
- * - Form elements should have a visible label ([url](https://dequeuniversity.com/rules/axe/4.7/label-title-only?application=axeAPI))
610
+ * - Ensure that every form element has a visible label and is not solely labeled using hidden labels, or the title or aria-describedby attributes
611
+ * - Form elements should have a visible label ([url](https://dequeuniversity.com/rules/axe/4.10/label-title-only?application=axeAPI))
587
612
  */
588
613
  labelTitleOnly: "label-title-only",
589
614
  /**
590
- * - Ensures every form element has a label
591
- * - Form elements must have labels ([url](https://dequeuniversity.com/rules/axe/4.7/label?application=axeAPI))
615
+ * - Ensure every form element has a label
616
+ * - Form elements must have labels ([url](https://dequeuniversity.com/rules/axe/4.10/label?application=axeAPI))
592
617
  */
593
618
  label: "label",
594
619
  /**
595
- * - Ensures select element has an accessible name
596
- * - Select element must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.7/select-name?application=axeAPI))
620
+ * - Ensure select element has an accessible name
621
+ * - Select element must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/select-name?application=axeAPI))
597
622
  */
598
623
  selectName: "select-name"
599
624
  };
600
625
  var structure = {
601
626
  /**
602
627
  * - Ensure that text spacing set through style attributes can be adjusted with custom stylesheets
603
- * - Inline text spacing must be adjustable with custom stylesheets ([url](https://dequeuniversity.com/rules/axe/4.7/avoid-inline-spacing?application=axeAPI))
628
+ * - Inline text spacing must be adjustable with custom stylesheets ([url](https://dequeuniversity.com/rules/axe/4.10/avoid-inline-spacing?application=axeAPI))
604
629
  */
605
630
  avoidInlineSpacing: "avoid-inline-spacing",
606
631
  /**
607
- * - Ensures content is not locked to any specific display orientation, and the content is operable in all display orientations
608
- * - CSS Media queries must not lock display orientation ([url](https://dequeuniversity.com/rules/axe/4.7/css-orientation-lock?application=axeAPI))
632
+ * - Ensure content is not locked to any specific display orientation, and the content is operable in all display orientations
633
+ * - CSS Media queries must not lock display orientation ([url](https://dequeuniversity.com/rules/axe/4.10/css-orientation-lock?application=axeAPI))
609
634
  */
610
635
  cssOrientationLock: "css-orientation-lock",
611
636
  /**
612
- * - Ensures `<dl>` elements are structured correctly
613
- * - `<dl>` elements must only directly contain properly-ordered `<dt>` and `<dd>` groups, `<script>`, `<template>` or `<div>` elements ([url](https://dequeuniversity.com/rules/axe/4.7/definition-list?application=axeAPI))
637
+ * - Ensure `<dl>` elements are structured correctly
638
+ * - `<dl>` elements must only directly contain properly-ordered `<dt>` and `<dd>` groups, `<script>`, `<template>` or `<div>` elements ([url](https://dequeuniversity.com/rules/axe/4.10/definition-list?application=axeAPI))
614
639
  */
615
640
  definitionList: "definition-list",
616
641
  /**
617
- * - Ensures `<dt>` and `<dd>` elements are contained by a `<dl>`
618
- * - `<dt>` and `<dd>` elements must be contained by a `<dl>` ([url](https://dequeuniversity.com/rules/axe/4.7/dlitem?application=axeAPI))
642
+ * - Ensure `<dt>` and `<dd>` elements are contained by a `<dl>`
643
+ * - `<dt>` and `<dd>` elements must be contained by a `<dl>` ([url](https://dequeuniversity.com/rules/axe/4.10/dlitem?application=axeAPI))
619
644
  */
620
645
  dlitem: "dlitem",
621
646
  /**
622
- * - Ensures `<iframe>` and `<frame>` elements contain the axe-core script
623
- * - Frames should be tested with axe-core ([url](https://dequeuniversity.com/rules/axe/4.7/frame-tested?application=axeAPI))
647
+ * - Ensure `<iframe>` and `<frame>` elements contain the axe-core script
648
+ * - Frames should be tested with axe-core ([url](https://dequeuniversity.com/rules/axe/4.10/frame-tested?application=axeAPI))
624
649
  */
625
650
  frameTested: "frame-tested",
626
651
  /**
627
652
  * - Informs users about hidden content.
628
- * - Hidden content on the page should be analyzed ([url](https://dequeuniversity.com/rules/axe/4.7/hidden-content?application=axeAPI))
653
+ * - Hidden content on the page should be analyzed ([url](https://dequeuniversity.com/rules/axe/4.10/hidden-content?application=axeAPI))
629
654
  */
630
655
  hiddenContent: "hidden-content",
631
656
  /**
632
- * - Ensures that lists are structured correctly
633
- * - `<ul>` and `<ol>` must only directly contain `<li>`, `<script>` or `<template>` elements ([url](https://dequeuniversity.com/rules/axe/4.7/list?application=axeAPI))
657
+ * - Ensure that lists are structured correctly
658
+ * - `<ul>` and `<ol>` must only directly contain `<li>`, `<script>` or `<template>` elements ([url](https://dequeuniversity.com/rules/axe/4.10/list?application=axeAPI))
634
659
  */
635
660
  list: "list",
636
661
  /**
637
- * - Ensures `<li>` elements are used semantically
638
- * - `<li>` elements must be contained in a `<ul>` or `<ol>` ([url](https://dequeuniversity.com/rules/axe/4.7/listitem?application=axeAPI))
662
+ * - Ensure `<li>` elements are used semantically
663
+ * - `<li>` elements must be contained in a `<ul>` or `<ol>` ([url](https://dequeuniversity.com/rules/axe/4.10/listitem?application=axeAPI))
639
664
  */
640
665
  listitem: "listitem"
641
666
  };
642
667
  var parsing = {
643
668
  /**
644
- * - Ensures every id attribute value of active elements is unique
645
- * - IDs of active elements must be unique ([url](https://dequeuniversity.com/rules/axe/4.7/duplicate-id-active?application=axeAPI))
669
+ * - Ensure every id attribute value of active elements is unique
670
+ * - IDs of active elements must be unique ([url](https://dequeuniversity.com/rules/axe/4.10/duplicate-id-active?application=axeAPI))
646
671
  */
647
672
  duplicateIdActive: "duplicate-id-active",
648
673
  /**
649
- * - Ensures every id attribute value used in ARIA and in labels is unique
650
- * - IDs used in ARIA and labels must be unique ([url](https://dequeuniversity.com/rules/axe/4.7/duplicate-id-aria?application=axeAPI))
674
+ * - Ensure every id attribute value used in ARIA and in labels is unique
675
+ * - IDs used in ARIA and labels must be unique ([url](https://dequeuniversity.com/rules/axe/4.10/duplicate-id-aria?application=axeAPI))
651
676
  */
652
677
  duplicateIdAria: "duplicate-id-aria",
653
678
  /**
654
- * - Ensures every id attribute value is unique
655
- * - id attribute value must be unique ([url](https://dequeuniversity.com/rules/axe/4.7/duplicate-id?application=axeAPI))
679
+ * - Ensure every id attribute value is unique
680
+ * - id attribute value must be unique ([url](https://dequeuniversity.com/rules/axe/4.10/duplicate-id?application=axeAPI))
656
681
  */
657
682
  duplicateId: "duplicate-id",
658
683
  /**
659
- * - Ensures `<marquee>` elements are not used
660
- * - `<marquee>` elements are deprecated and must not be used ([url](https://dequeuniversity.com/rules/axe/4.7/marquee?application=axeAPI))
684
+ * - Ensure `<marquee>` elements are not used
685
+ * - `<marquee>` elements are deprecated and must not be used ([url](https://dequeuniversity.com/rules/axe/4.10/marquee?application=axeAPI))
661
686
  */
662
687
  marquee: "marquee"
663
688
  };
664
689
  var semantics = {
665
690
  /**
666
- * - Ensures the order of headings is semantically correct
667
- * - Heading levels should only increase by one ([url](https://dequeuniversity.com/rules/axe/4.7/heading-order?application=axeAPI))
691
+ * - Ensure the order of headings is semantically correct
692
+ * - Heading levels should only increase by one ([url](https://dequeuniversity.com/rules/axe/4.10/heading-order?application=axeAPI))
668
693
  */
669
694
  headingOrder: "heading-order",
670
695
  /**
671
696
  * - Ensure that links with the same accessible name serve a similar purpose
672
- * - Links with the same name must have a similar purpose ([url](https://dequeuniversity.com/rules/axe/4.7/identical-links-same-purpose?application=axeAPI))
697
+ * - Links with the same name must have a similar purpose ([url](https://dequeuniversity.com/rules/axe/4.10/identical-links-same-purpose?application=axeAPI))
673
698
  */
674
699
  identicalLinksSamePurpose: "identical-links-same-purpose",
675
700
  /**
676
- * - Ensures that elements labelled through their content must have their visible text as part of their accessible name
677
- * - Elements must have their visible text as part of their accessible name ([url](https://dequeuniversity.com/rules/axe/4.7/label-content-name-mismatch?application=axeAPI))
701
+ * - Ensure that elements labelled through their content must have their visible text as part of their accessible name
702
+ * - Elements must have their visible text as part of their accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/label-content-name-mismatch?application=axeAPI))
678
703
  */
679
704
  labelContentNameMismatch: "label-content-name-mismatch",
680
705
  /**
681
- * - Ensures the banner landmark is at top level
682
- * - Banner landmark should not be contained in another landmark ([url](https://dequeuniversity.com/rules/axe/4.7/landmark-banner-is-top-level?application=axeAPI))
706
+ * - Ensure the banner landmark is at top level
707
+ * - Banner landmark should not be contained in another landmark ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-banner-is-top-level?application=axeAPI))
683
708
  */
684
709
  landmarkBannerIsTopLevel: "landmark-banner-is-top-level",
685
710
  /**
686
- * - Ensures the complementary landmark or aside is at top level
687
- * - Aside should not be contained in another landmark ([url](https://dequeuniversity.com/rules/axe/4.7/landmark-complementary-is-top-level?application=axeAPI))
711
+ * - Ensure the complementary landmark or aside is at top level
712
+ * - Aside should not be contained in another landmark ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-complementary-is-top-level?application=axeAPI))
688
713
  */
689
714
  landmarkComplementaryIsTopLevel: "landmark-complementary-is-top-level",
690
715
  /**
691
- * - Ensures the contentinfo landmark is at top level
692
- * - Contentinfo landmark should not be contained in another landmark ([url](https://dequeuniversity.com/rules/axe/4.7/landmark-contentinfo-is-top-level?application=axeAPI))
716
+ * - Ensure the contentinfo landmark is at top level
717
+ * - Contentinfo landmark should not be contained in another landmark ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-contentinfo-is-top-level?application=axeAPI))
693
718
  */
694
719
  landmarkContentinfoIsTopLevel: "landmark-contentinfo-is-top-level",
695
720
  /**
696
- * - Ensures the main landmark is at top level
697
- * - Main landmark should not be contained in another landmark ([url](https://dequeuniversity.com/rules/axe/4.7/landmark-main-is-top-level?application=axeAPI))
721
+ * - Ensure the main landmark is at top level
722
+ * - Main landmark should not be contained in another landmark ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-main-is-top-level?application=axeAPI))
698
723
  */
699
724
  landmarkMainIsTopLevel: "landmark-main-is-top-level",
700
725
  /**
701
- * - Ensures the document has at most one banner landmark
702
- * - Document should not have more than one banner landmark ([url](https://dequeuniversity.com/rules/axe/4.7/landmark-no-duplicate-banner?application=axeAPI))
726
+ * - Ensure the document has at most one banner landmark
727
+ * - Document should not have more than one banner landmark ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-no-duplicate-banner?application=axeAPI))
703
728
  */
704
729
  landmarkNoDuplicateBanner: "landmark-no-duplicate-banner",
705
730
  /**
706
- * - Ensures the document has at most one contentinfo landmark
707
- * - Document should not have more than one contentinfo landmark ([url](https://dequeuniversity.com/rules/axe/4.7/landmark-no-duplicate-contentinfo?application=axeAPI))
731
+ * - Ensure the document has at most one contentinfo landmark
732
+ * - Document should not have more than one contentinfo landmark ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-no-duplicate-contentinfo?application=axeAPI))
708
733
  */
709
734
  landmarkNoDuplicateContentinfo: "landmark-no-duplicate-contentinfo",
710
735
  /**
711
- * - Ensures the document has at most one main landmark
712
- * - Document should not have more than one main landmark ([url](https://dequeuniversity.com/rules/axe/4.7/landmark-no-duplicate-main?application=axeAPI))
736
+ * - Ensure the document has at most one main landmark
737
+ * - Document should not have more than one main landmark ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-no-duplicate-main?application=axeAPI))
713
738
  */
714
739
  landmarkNoDuplicateMain: "landmark-no-duplicate-main",
715
740
  /**
716
- * - Ensures the document has a main landmark
717
- * - Document should have one main landmark ([url](https://dequeuniversity.com/rules/axe/4.7/landmark-one-main?application=axeAPI))
741
+ * - Ensure the document has a main landmark
742
+ * - Document should have one main landmark ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-one-main?application=axeAPI))
718
743
  */
719
744
  landmarkOneMain: "landmark-one-main",
720
745
  /**
721
- * - Landmarks should have a unique role or role/label/title (i.e. accessible name) combination
722
- * - Ensures landmarks are unique ([url](https://dequeuniversity.com/rules/axe/4.7/landmark-unique?application=axeAPI))
746
+ * - Ensure landmarks are unique
747
+ * - Landmarks should have a unique role or role/label/title (i.e. accessible name) combination ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-unique?application=axeAPI))
723
748
  */
724
749
  landmarkUnique: "landmark-unique",
725
750
  /**
726
751
  * - Ensure bold, italic text and font-size is not used to style `<p>` elements as a heading
727
- * - Styled `<p>` elements must not be used as headings ([url](https://dequeuniversity.com/rules/axe/4.7/p-as-heading?application=axeAPI))
752
+ * - Styled `<p>` elements must not be used as headings ([url](https://dequeuniversity.com/rules/axe/4.10/p-as-heading?application=axeAPI))
728
753
  */
729
754
  pAsHeading: "p-as-heading",
730
755
  /**
731
756
  * - Ensure that the page, or at least one of its frames contains a level-one heading
732
- * - Page should contain a level-one heading ([url](https://dequeuniversity.com/rules/axe/4.7/page-has-heading-one?application=axeAPI))
757
+ * - Page should contain a level-one heading ([url](https://dequeuniversity.com/rules/axe/4.10/page-has-heading-one?application=axeAPI))
733
758
  */
734
759
  pageHasHeadingOne: "page-has-heading-one"
735
760
  };
736
761
  var language = {
737
762
  /**
738
- * - Ensures every HTML document has a lang attribute
739
- * - `<html>` element must have a lang attribute ([url](https://dequeuniversity.com/rules/axe/4.7/html-has-lang?application=axeAPI))
763
+ * - Ensure every HTML document has a lang attribute
764
+ * - `<html>` element must have a lang attribute ([url](https://dequeuniversity.com/rules/axe/4.10/html-has-lang?application=axeAPI))
740
765
  */
741
766
  htmlHasLang: "html-has-lang",
742
767
  /**
743
- * - Ensures the lang attribute of the `<html>` element has a valid value
744
- * - `<html>` element must have a valid value for the lang attribute ([url](https://dequeuniversity.com/rules/axe/4.7/html-lang-valid?application=axeAPI))
768
+ * - Ensure the lang attribute of the `<html>` element has a valid value
769
+ * - `<html>` element must have a valid value for the lang attribute ([url](https://dequeuniversity.com/rules/axe/4.10/html-lang-valid?application=axeAPI))
745
770
  */
746
771
  htmlLangValid: "html-lang-valid",
747
772
  /**
748
773
  * - Ensure that HTML elements with both valid lang and xml:lang attributes agree on the base language of the page
749
- * - HTML elements with lang and xml:lang must have the same base language ([url](https://dequeuniversity.com/rules/axe/4.7/html-xml-lang-mismatch?application=axeAPI))
774
+ * - HTML elements with lang and xml:lang must have the same base language ([url](https://dequeuniversity.com/rules/axe/4.10/html-xml-lang-mismatch?application=axeAPI))
750
775
  */
751
776
  htmlXmlLangMismatch: "html-xml-lang-mismatch",
752
777
  /**
753
- * - Ensures lang attributes have valid values
754
- * - lang attribute must have a valid value ([url](https://dequeuniversity.com/rules/axe/4.7/valid-lang?application=axeAPI))
778
+ * - Ensure lang attributes have valid values
779
+ * - lang attribute must have a valid value ([url](https://dequeuniversity.com/rules/axe/4.10/valid-lang?application=axeAPI))
755
780
  */
756
781
  validLang: "valid-lang"
757
782
  };
758
783
  var sensoryAndVisualCues = {
759
784
  /**
760
- * - Ensures `<meta name="viewport">` can scale a significant amount
761
- * - Users should be able to zoom and scale the text up to 500% ([url](https://dequeuniversity.com/rules/axe/4.7/meta-viewport-large?application=axeAPI))
785
+ * - Ensure `<meta name="viewport">` can scale a significant amount
786
+ * - Users should be able to zoom and scale the text up to 500% ([url](https://dequeuniversity.com/rules/axe/4.10/meta-viewport-large?application=axeAPI))
762
787
  */
763
788
  metaViewportLarge: "meta-viewport-large",
764
789
  /**
765
- * - Ensures `<meta name="viewport">` does not disable text scaling and zooming
766
- * - Zooming and scaling must not be disabled ([url](https://dequeuniversity.com/rules/axe/4.7/meta-viewport?application=axeAPI))
790
+ * - Ensure `<meta name="viewport">` does not disable text scaling and zooming
791
+ * - Zooming and scaling must not be disabled ([url](https://dequeuniversity.com/rules/axe/4.10/meta-viewport?application=axeAPI))
767
792
  */
768
793
  metaViewport: "meta-viewport",
769
794
  /**
770
- * - Ensure touch target have sufficient size and space
771
- * - All touch targets must be 24px large, or leave sufficient space ([url](https://dequeuniversity.com/rules/axe/4.7/target-size?application=axeAPI))
795
+ * - Ensure touch targets have sufficient size and space
796
+ * - All touch targets must be 24px large, or leave sufficient space ([url](https://dequeuniversity.com/rules/axe/4.10/target-size?application=axeAPI))
772
797
  */
773
798
  targetSize: "target-size"
774
799
  };
775
800
  var tables = {
776
801
  /**
777
- * - Ensures the scope attribute is used correctly on tables
778
- * - scope attribute should be used correctly ([url](https://dequeuniversity.com/rules/axe/4.7/scope-attr-valid?application=axeAPI))
802
+ * - Ensure the scope attribute is used correctly on tables
803
+ * - scope attribute should be used correctly ([url](https://dequeuniversity.com/rules/axe/4.10/scope-attr-valid?application=axeAPI))
779
804
  */
780
805
  scopeAttrValid: "scope-attr-valid",
781
806
  /**
782
807
  * - Ensure the `<caption>` element does not contain the same text as the summary attribute
783
- * - tables should not have the same summary and caption ([url](https://dequeuniversity.com/rules/axe/4.7/table-duplicate-name?application=axeAPI))
808
+ * - Tables should not have the same summary and caption ([url](https://dequeuniversity.com/rules/axe/4.10/table-duplicate-name?application=axeAPI))
784
809
  */
785
810
  tableDuplicateName: "table-duplicate-name",
786
811
  /**
787
812
  * - Ensure that tables with a caption use the `<caption>` element.
788
- * - Data or header cells must not be used to give caption to a data table. ([url](https://dequeuniversity.com/rules/axe/4.7/table-fake-caption?application=axeAPI))
813
+ * - Data or header cells must not be used to give caption to a data table. ([url](https://dequeuniversity.com/rules/axe/4.10/table-fake-caption?application=axeAPI))
789
814
  */
790
815
  tableFakeCaption: "table-fake-caption",
791
816
  /**
792
817
  * - Ensure that each non-empty data cell in a `<table>` larger than 3 by 3 has one or more table headers
793
- * - Non-empty `<td>` elements in larger `<table>` must have an associated table header ([url](https://dequeuniversity.com/rules/axe/4.7/td-has-header?application=axeAPI))
818
+ * - Non-empty `<td>` elements in larger `<table>` must have an associated table header ([url](https://dequeuniversity.com/rules/axe/4.10/td-has-header?application=axeAPI))
794
819
  */
795
820
  tdHasHeader: "td-has-header",
796
821
  /**
797
822
  * - Ensure that each cell in a table that uses the headers attribute refers only to other cells in that table
798
- * - Table cells that use the headers attribute must only refer to cells in the same table ([url](https://dequeuniversity.com/rules/axe/4.7/td-headers-attr?application=axeAPI))
823
+ * - Table cells that use the headers attribute must only refer to cells in the same table ([url](https://dequeuniversity.com/rules/axe/4.10/td-headers-attr?application=axeAPI))
799
824
  */
800
825
  tdHeadersAttr: "td-headers-attr",
801
826
  /**
802
827
  * - Ensure that `<th>` elements and elements with role=columnheader/rowheader have data cells they describe
803
- * - Table headers in a data table must refer to data cells ([url](https://dequeuniversity.com/rules/axe/4.7/th-has-data-cells?application=axeAPI))
828
+ * - Table headers in a data table must refer to data cells ([url](https://dequeuniversity.com/rules/axe/4.10/th-has-data-cells?application=axeAPI))
804
829
  */
805
830
  thHasDataCells: "th-has-data-cells"
806
831
  };
@@ -808,12 +833,16 @@ var tables = {
808
833
  // src/service/html/axe-rules/rule-exceptions.ts
809
834
  var ruleExceptions = {
810
835
  [aria.ariaAllowedRole]: { dynamicAttrs: ["role"] },
836
+ [aria.ariaBrailleEquivalent]: { attrSpread: true },
811
837
  [aria.ariaCommandName]: { unknownBody: true, attrSpread: true },
838
+ [aria.ariaConditionalAttr]: { unknownBody: true, attrSpread: true },
839
+ [aria.ariaDeprecatedRole]: { dynamicAttrs: ["role"] },
812
840
  [aria.ariaDialogName]: { unknownBody: true, attrSpread: true },
813
841
  [aria.ariaHiddenBody]: {},
814
842
  [aria.ariaInputFieldName]: { unknownBody: true, attrSpread: true },
815
843
  [aria.ariaMeterName]: { unknownBody: true, attrSpread: true },
816
844
  [aria.ariaProgressbarName]: { unknownBody: true, attrSpread: true },
845
+ [aria.ariaProhibitedAttr]: {},
817
846
  [aria.ariaRequiredAttr]: { attrSpread: true },
818
847
  [aria.ariaRequiredChildren]: { unknownBody: true },
819
848
  [aria.ariaRoles]: { dynamicAttrs: ["role"] },
@@ -825,7 +854,6 @@ var ruleExceptions = {
825
854
  [forms.autocompleteValid]: {},
826
855
  [forms.formFieldMultipleLabels]: {},
827
856
  [keyboard.accesskeys]: {},
828
- [keyboard.focusOrderSemantics]: {},
829
857
  [keyboard.frameFocusableContent]: { unknownBody: true },
830
858
  [keyboard.skipLink]: { unknownBody: true },
831
859
  [keyboard.tabindex]: {},
@@ -842,9 +870,9 @@ var ruleExceptions = {
842
870
  attrSpread: true
843
871
  },
844
872
  [nameRoleValue.linkName]: { unknownBody: true, attrSpread: true },
873
+ [nameRoleValue.summaryName]: { unknownBody: true, attrSpread: true },
845
874
  [parsing.marquee]: {},
846
875
  [semantics.identicalLinksSamePurpose]: {},
847
- [semantics.labelContentNameMismatch]: { unknownBody: true },
848
876
  [semantics.landmarkNoDuplicateBanner]: {},
849
877
  [semantics.landmarkNoDuplicateContentinfo]: {},
850
878
  [semantics.landmarkNoDuplicateMain]: {},
@@ -855,7 +883,6 @@ var ruleExceptions = {
855
883
  [structure.list]: { unknownBody: true },
856
884
  [tables.scopeAttrValid]: {},
857
885
  [tables.tableDuplicateName]: { unknownBody: true },
858
- [tables.tableFakeCaption]: { unknownBody: true },
859
886
  [tables.thHasDataCells]: { unknownBody: true },
860
887
  [textAlternatives.areaAlt]: { attrSpread: true },
861
888
  [textAlternatives.documentTitle]: { unknownBody: true },
@@ -910,15 +937,14 @@ var HTMLService = {
910
937
  const violations = await getViolationNodes(Object.keys(ruleExceptions));
911
938
  release();
912
939
  return violations.flatMap((result) => {
913
- var _a;
914
940
  const { element } = result;
915
941
  if (!element) return [];
916
942
  const ruleId = result.ruleId;
917
943
  if (element.dataset.markoNodeId) {
918
944
  const details = nodeDetails[element.dataset.markoNodeId];
919
- if (ruleExceptions[ruleId].attrSpread && details.hasDynamicAttrs || ruleExceptions[ruleId].unknownBody && details.hasDynamicBody || ((_a = ruleExceptions[ruleId].dynamicAttrs) == null ? void 0 : _a.some(
945
+ if (ruleExceptions[ruleId].attrSpread && details.hasDynamicAttrs || ruleExceptions[ruleId].unknownBody && details.hasDynamicBody || ruleExceptions[ruleId].dynamicAttrs?.some(
920
946
  (attr) => element.getAttribute(attr) === "dynamic"
921
- ))) {
947
+ )) {
922
948
  return [];
923
949
  }
924
950
  }
@@ -1100,8 +1126,7 @@ var linkedAttrs = /* @__PURE__ */ new Map([
1100
1126
  ["poster", /* @__PURE__ */ new Set(["video"])]
1101
1127
  ]);
1102
1128
  function isDocumentLinkAttr(code, tag, attr) {
1103
- var _a, _b;
1104
- return tag.nameText && attr.type === NodeType.AttrNamed && ((_a = attr.value) == null ? void 0 : _a.type) === NodeType.AttrValue && /^['"]$/.test(code[attr.value.value.start]) && ((_b = linkedAttrs.get(code.slice(attr.name.start, attr.name.end))) == null ? void 0 : _b.has(tag.nameText)) || false;
1129
+ return tag.nameText && attr.type === NodeType.AttrNamed && attr.value?.type === NodeType.AttrValue && /^['"]$/.test(code[attr.value.value.start]) && linkedAttrs.get(code.slice(attr.name.start, attr.name.end))?.has(tag.nameText) || false;
1105
1130
  }
1106
1131
 
1107
1132
  // src/utils/file-system.ts
@@ -1229,7 +1254,6 @@ function getTagNameCompletion({
1229
1254
  showAutoComplete,
1230
1255
  importer
1231
1256
  }) {
1232
- var _a;
1233
1257
  let label = tag.isNestedTag ? `@${tag.name}` : tag.name;
1234
1258
  const fileForTag = tag.template || tag.renderer || tag.filePath;
1235
1259
  const fileURIForTag = URI3.file(fileForTag).toString();
@@ -1249,7 +1273,7 @@ function getTagNameCompletion({
1249
1273
 
1250
1274
  ${tag.description}`;
1251
1275
  }
1252
- const autocomplete = showAutoComplete ? (_a = tag.autocomplete) == null ? void 0 : _a[0] : void 0;
1276
+ const autocomplete = showAutoComplete ? tag.autocomplete?.[0] : void 0;
1253
1277
  if (autocomplete) {
1254
1278
  if (autocomplete.displayText) {
1255
1279
  label = autocomplete.displayText;
@@ -1271,7 +1295,7 @@ ${autocomplete.description}`;
1271
1295
  tags: tag.deprecated ? deprecated : void 0,
1272
1296
  insertTextFormat: autocomplete ? InsertTextFormat2.Snippet : void 0,
1273
1297
  kind: tag.html ? CompletionItemKind3.Property : CompletionItemKind3.Class,
1274
- textEdit: range && TextEdit3.replace(range, (autocomplete == null ? void 0 : autocomplete.snippet) || label)
1298
+ textEdit: range && TextEdit3.replace(range, autocomplete?.snippet || label)
1275
1299
  };
1276
1300
  }
1277
1301
 
@@ -1281,7 +1305,6 @@ function Import({
1281
1305
  node,
1282
1306
  file: { parsed, filename, lookup }
1283
1307
  }) {
1284
- var _a;
1285
1308
  const value = parsed.read(node);
1286
1309
  const match = importTagReg.exec(value);
1287
1310
  if (match) {
@@ -1293,7 +1316,7 @@ function Import({
1293
1316
  });
1294
1317
  const result = [];
1295
1318
  for (const tag of lookup.getTagsSorted()) {
1296
- if ((tag.template || tag.renderer) && !(tag.html || tag.parser || tag.translator || tag.isNestedTag || tag.name === "*" || ((_a = tag.parseOptions) == null ? void 0 : _a.statement) || /^@?marko[/-]/.test(tag.taglibId) || tag.name[0] === "_" && /[\\/]node_modules[\\/]/.test(tag.filePath))) {
1319
+ if ((tag.template || tag.renderer) && !(tag.html || tag.parser || tag.translator || tag.isNestedTag || tag.name === "*" || tag.parseOptions?.statement || /^@?marko[/-]/.test(tag.taglibId) || tag.name[0] === "_" && /[\\/]node_modules[\\/]/.test(tag.filePath))) {
1297
1320
  const completion = getTagNameCompletion({
1298
1321
  tag,
1299
1322
  importer: filename
@@ -1313,14 +1336,13 @@ function OpenTagName({
1313
1336
  node,
1314
1337
  file: { parsed, filename, lookup }
1315
1338
  }) {
1316
- var _a;
1317
1339
  const tag = node.parent;
1318
1340
  const range = parsed.locationAt(node);
1319
1341
  const isAttrTag = tag.type === NodeType2.AttrTag;
1320
1342
  const result = [];
1321
1343
  if (isAttrTag) {
1322
1344
  let parentTag = tag.owner;
1323
- while ((parentTag == null ? void 0 : parentTag.type) === NodeType2.AttrTag) parentTag = parentTag.owner;
1345
+ while (parentTag?.type === NodeType2.AttrTag) parentTag = parentTag.owner;
1324
1346
  const parentTagDef = parentTag && parentTag.nameText && lookup.getTag(parentTag.nameText);
1325
1347
  if (parentTagDef) {
1326
1348
  const { nestedTags } = parentTagDef;
@@ -1341,7 +1363,7 @@ function OpenTagName({
1341
1363
  } else {
1342
1364
  const skipStatements = !(tag.concise && tag.parent.type === NodeType2.Program);
1343
1365
  for (const tag2 of lookup.getTagsSorted()) {
1344
- if (!(tag2.name === "*" || tag2.isNestedTag || skipStatements && ((_a = tag2.parseOptions) == null ? void 0 : _a.statement) || tag2.name[0] === "_" && /^@?marko[/-]|[\\/]node_modules[\\/]/.test(tag2.filePath))) {
1366
+ if (!(tag2.name === "*" || tag2.isNestedTag || skipStatements && tag2.parseOptions?.statement || tag2.name[0] === "_" && /^@?marko[/-]|[\\/]node_modules[\\/]/.test(tag2.filePath))) {
1345
1367
  const completion = getTagNameCompletion({
1346
1368
  tag: tag2,
1347
1369
  range,
@@ -1414,17 +1436,16 @@ var handlers = {
1414
1436
  Import
1415
1437
  };
1416
1438
  var doComplete = async (doc, params) => {
1417
- var _a;
1418
1439
  const file = getMarkoFile(doc);
1419
1440
  const offset = doc.offsetAt(params.position);
1420
1441
  const node = file.parsed.nodeAt(offset);
1421
1442
  return {
1422
- items: await ((_a = handlers[NodeType3[node.type]]) == null ? void 0 : _a.call(handlers, {
1443
+ items: await handlers[NodeType3[node.type]]?.({
1423
1444
  file,
1424
1445
  params,
1425
1446
  offset,
1426
1447
  node
1427
- })) || [],
1448
+ }) || [],
1428
1449
  isIncomplete: true
1429
1450
  };
1430
1451
  };
@@ -1484,7 +1505,7 @@ function AttrName2({
1484
1505
  if (!attrDef) {
1485
1506
  return;
1486
1507
  }
1487
- const attrEntryFile = attrDef.filePath || (tagDef == null ? void 0 : tagDef.filePath);
1508
+ const attrEntryFile = attrDef.filePath || tagDef?.filePath;
1488
1509
  if (!attrEntryFile) {
1489
1510
  return;
1490
1511
  }
@@ -1529,7 +1550,7 @@ function OpenTagName2({
1529
1550
  let range = START_LOCATION;
1530
1551
  if (tag.type === NodeType4.AttrTag) {
1531
1552
  let parentTag = tag.owner;
1532
- while ((parentTag == null ? void 0 : parentTag.type) === NodeType4.AttrTag) parentTag = parentTag.owner;
1553
+ while (parentTag?.type === NodeType4.AttrTag) parentTag = parentTag.owner;
1533
1554
  tagDef = parentTag && parentTag.nameText ? lookup.getTag(parentTag.nameText) : void 0;
1534
1555
  } else {
1535
1556
  tagDef = tag.nameText ? lookup.getTag(tag.nameText) : void 0;
@@ -1570,16 +1591,15 @@ var handlers2 = {
1570
1591
  AttrName: AttrName2
1571
1592
  };
1572
1593
  var findDefinition = async (doc, params) => {
1573
- var _a;
1574
1594
  const file = getMarkoFile(doc);
1575
1595
  const offset = doc.offsetAt(params.position);
1576
1596
  const node = file.parsed.nodeAt(offset);
1577
- return await ((_a = handlers2[NodeType5[node.type]]) == null ? void 0 : _a.call(handlers2, {
1597
+ return await handlers2[NodeType5[node.type]]?.({
1578
1598
  file,
1579
1599
  params,
1580
1600
  offset,
1581
1601
  node
1582
- })) || [];
1602
+ }) || [];
1583
1603
  };
1584
1604
 
1585
1605
  // src/service/marko/document-links.ts
@@ -1677,13 +1697,12 @@ function extractDocumentSymbols({
1677
1697
  const symbols = [];
1678
1698
  const { program } = parsed;
1679
1699
  const visit = (node) => {
1680
- var _a, _b;
1681
1700
  switch (node.type) {
1682
1701
  case NodeType7.Tag:
1683
1702
  case NodeType7.AttrTag:
1684
1703
  symbols.push({
1685
- name: (node.type === NodeType7.AttrTag ? (_a = node.nameText) == null ? void 0 : _a.slice(node.nameText.indexOf("@")) : node.nameText) || "<${...}>",
1686
- kind: node.nameText && ((_b = lookup.getTag(node.nameText)) == null ? void 0 : _b.html) && SymbolKind.Property || SymbolKind.Class,
1704
+ name: (node.type === NodeType7.AttrTag ? node.nameText?.slice(node.nameText.indexOf("@")) : node.nameText) || "<${...}>",
1705
+ kind: node.nameText && lookup.getTag(node.nameText)?.html && SymbolKind.Property || SymbolKind.Class,
1687
1706
  location: {
1688
1707
  uri,
1689
1708
  range: parsed.locationAt(node)
@@ -1725,7 +1744,7 @@ async function formatDocument(doc, formatOptions, cancel) {
1725
1744
  }).catch(() => null) : null
1726
1745
  };
1727
1746
  markoPrettier.setCompiler(Project3.getCompiler(dir), Project3.getConfig(dir));
1728
- if (cancel == null ? void 0 : cancel.isCancellationRequested) return;
1747
+ if (cancel?.isCancellationRequested) return;
1729
1748
  return [
1730
1749
  TextEdit6.replace(
1731
1750
  {
@@ -1774,16 +1793,15 @@ var handlers3 = {
1774
1793
  OpenTagName: OpenTagName3
1775
1794
  };
1776
1795
  var doHover = async (doc, params) => {
1777
- var _a;
1778
1796
  const file = getMarkoFile(doc);
1779
1797
  const offset = doc.offsetAt(params.position);
1780
1798
  const node = file.parsed.nodeAt(offset);
1781
- return await ((_a = handlers3[NodeType8[node.type]]) == null ? void 0 : _a.call(handlers3, {
1799
+ return await handlers3[NodeType8[node.type]]?.({
1782
1800
  file,
1783
1801
  params,
1784
1802
  offset,
1785
1803
  node
1786
- }));
1804
+ });
1787
1805
  };
1788
1806
 
1789
1807
  // src/service/marko/validate.ts
@@ -1921,10 +1939,10 @@ function isError(err) {
1921
1939
  return err != null && typeof err === "object" && typeof err.message === "string";
1922
1940
  }
1923
1941
  function isAggregateError(err) {
1924
- return Array.isArray(err == null ? void 0 : err.errors);
1942
+ return Array.isArray(err?.errors);
1925
1943
  }
1926
1944
  function isErrorWithLoc(err) {
1927
- const loc = err == null ? void 0 : err.loc;
1945
+ const loc = err?.loc;
1928
1946
  if (typeof loc !== "object") return false;
1929
1947
  return loc !== null && typeof loc === "object" && typeof loc.start === "object" && typeof loc.end === "object" && typeof loc.start.line === "number" && typeof loc.start.column === "number" && typeof loc.end.line === "number" && typeof loc.end.column === "number";
1930
1948
  }
@@ -1980,16 +1998,12 @@ import {
1980
1998
  var fsPathReg = /^(?:[./\\]|[A-Z]:)/i;
1981
1999
  var modulePartsReg = /^((?:@(?:[^/]+)\/)?(?:[^/]+))(.*)$/;
1982
2000
  function patch(ts2, configFile, extractCache3, resolutionCache, host, ps) {
1983
- var _a, _b, _c;
1984
2001
  const processors = Processors.create({
1985
2002
  ts: ts2,
1986
2003
  host,
1987
2004
  configFile
1988
2005
  });
1989
- const rootNames = Object.values(processors).map((processor) => {
1990
- var _a2;
1991
- return (_a2 = processor.getRootNames) == null ? void 0 : _a2.call(processor);
1992
- }).flat().filter(Boolean);
2006
+ const rootNames = Object.values(processors).map((processor) => processor.getRootNames?.()).flat().filter(Boolean);
1993
2007
  const trackFile = ps ? (fileName) => {
1994
2008
  ps.getOrCreateScriptInfoForNormalizedPath(
1995
2009
  fileName,
@@ -2005,7 +2019,7 @@ function patch(ts2, configFile, extractCache3, resolutionCache, host, ps) {
2005
2019
  host.getScriptFileNames = () => [
2006
2020
  ...new Set(rootNames.concat(getScriptFileNames()))
2007
2021
  ];
2008
- const getScriptKind = (_a = host.getScriptKind) == null ? void 0 : _a.bind(host);
2022
+ const getScriptKind = host.getScriptKind?.bind(host);
2009
2023
  if (getScriptKind) {
2010
2024
  host.getScriptKind = (fileName) => {
2011
2025
  const processor = getProcessor(fileName);
@@ -2041,19 +2055,19 @@ function patch(ts2, configFile, extractCache3, resolutionCache, host, ps) {
2041
2055
  return getScriptVersion(fileName);
2042
2056
  };
2043
2057
  }
2044
- const readDirectory2 = (_b = host.readDirectory) == null ? void 0 : _b.bind(host);
2058
+ const readDirectory2 = host.readDirectory?.bind(host);
2045
2059
  if (readDirectory2) {
2046
2060
  host.readDirectory = (path9, extensions, exclude, include, depth) => {
2047
2061
  return readDirectory2(
2048
2062
  path9,
2049
- extensions == null ? void 0 : extensions.concat(Processors.extensions),
2063
+ extensions?.concat(Processors.extensions),
2050
2064
  exclude,
2051
2065
  include,
2052
2066
  depth
2053
2067
  );
2054
2068
  };
2055
2069
  }
2056
- const resolveModuleNameLiterals = (_c = host.resolveModuleNameLiterals) == null ? void 0 : _c.bind(host);
2070
+ const resolveModuleNameLiterals = host.resolveModuleNameLiterals?.bind(host);
2057
2071
  if (resolveModuleNameLiterals) {
2058
2072
  host.resolveModuleNameLiterals = (moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) => {
2059
2073
  let normalModuleLiterals = moduleLiterals;
@@ -2157,14 +2171,13 @@ var REG_LINE = /\r\n|\n/;
2157
2171
  var REG_CODE_BLOCK = /^\s*[~`]{3}/m;
2158
2172
  var REG_CAPTION = /^<caption>(.*?)<\/caption>\s*(\r\n|\n)/;
2159
2173
  function printJSDocTag(tag) {
2160
- var _a;
2161
2174
  switch (tag.name) {
2162
2175
  case "augments":
2163
2176
  case "extends":
2164
2177
  case "param":
2165
2178
  case "template": {
2166
2179
  const body = getTagBodyParts(tag);
2167
- if ((body == null ? void 0 : body.length) === 3) {
2180
+ if (body?.length === 3) {
2168
2181
  const [, param, text] = body;
2169
2182
  return `${printTagName(tag.name)} \`${param}\`${printTagBody(
2170
2183
  replaceLinks(text)
@@ -2174,7 +2187,7 @@ function printJSDocTag(tag) {
2174
2187
  }
2175
2188
  case "return":
2176
2189
  case "returns": {
2177
- if (!((_a = tag.text) == null ? void 0 : _a.length)) return void 0;
2190
+ if (!tag.text?.length) return void 0;
2178
2191
  break;
2179
2192
  }
2180
2193
  }
@@ -2341,7 +2354,7 @@ var ScriptService = {
2341
2354
  commands: {
2342
2355
  "$/showScriptOutput": async (uri) => {
2343
2356
  const doc = get(uri);
2344
- if ((doc == null ? void 0 : doc.languageId) !== "marko") return;
2357
+ if (doc?.languageId !== "marko") return;
2345
2358
  const filename = getFSPath(doc);
2346
2359
  if (!filename) return;
2347
2360
  const tsProject = getTSProject(filename);
@@ -2378,7 +2391,6 @@ var ScriptService = {
2378
2391
  });
2379
2392
  },
2380
2393
  async doComplete(doc, params) {
2381
- var _a;
2382
2394
  const fileName = getFSPath(doc);
2383
2395
  if (!fileName) return;
2384
2396
  const project = getTSProject(fileName);
@@ -2392,10 +2404,10 @@ var ScriptService = {
2392
2404
  {
2393
2405
  ...await getPreferences(project.markoScriptLang),
2394
2406
  ...params.context,
2395
- triggerCharacter: getTSTriggerChar((_a = params.context) == null ? void 0 : _a.triggerCharacter)
2407
+ triggerCharacter: getTSTriggerChar(params.context?.triggerCharacter)
2396
2408
  }
2397
2409
  );
2398
- if (!(completions == null ? void 0 : completions.entries.length)) return;
2410
+ if (!completions?.entries.length) return;
2399
2411
  const result = [];
2400
2412
  for (const completion of completions.entries) {
2401
2413
  let { name: label, insertText, sortText } = completion;
@@ -2488,7 +2500,7 @@ var ScriptService = {
2488
2500
  await getPreferences(project.markoScriptLang),
2489
2501
  data.originalData
2490
2502
  );
2491
- if (!(detail == null ? void 0 : detail.codeActions)) return;
2503
+ if (!detail?.codeActions) return;
2492
2504
  const extracted = processScript(doc, project);
2493
2505
  const textEdits = item.additionalTextEdits = item.additionalTextEdits || [];
2494
2506
  for (const action of detail.codeActions) {
@@ -2535,7 +2547,7 @@ var ScriptService = {
2535
2547
  fileName,
2536
2548
  generatedOffset
2537
2549
  );
2538
- if (!(boundary == null ? void 0 : boundary.definitions)) return;
2550
+ if (!boundary?.definitions) return;
2539
2551
  const originSelectionRange = sourceLocationAtTextSpan(
2540
2552
  extracted,
2541
2553
  boundary.textSpan
@@ -2696,14 +2708,13 @@ ${documentation}`;
2696
2708
  };
2697
2709
  function processScript(doc, tsProject) {
2698
2710
  return processDoc(doc, ({ filename, parsed, lookup }) => {
2699
- var _a;
2700
2711
  const { host, markoScriptLang } = tsProject;
2701
2712
  return extractScript({
2702
2713
  ts,
2703
2714
  parsed,
2704
2715
  lookup,
2705
2716
  scriptLang: filename ? Project5.getScriptLang(filename, markoScriptLang, ts, host) : markoScriptLang,
2706
- runtimeTypesCode: (_a = Project5.getTypeLibs(tsProject.rootDir, ts, host)) == null ? void 0 : _a.markoTypesCode
2717
+ runtimeTypesCode: Project5.getTypeLibs(tsProject.rootDir, ts, host)?.markoTypesCode
2707
2718
  });
2708
2719
  });
2709
2720
  }
@@ -2771,12 +2782,11 @@ function getTSConfigFile(fileName) {
2771
2782
  return configFile;
2772
2783
  }
2773
2784
  function getTSProject(docFsPath) {
2774
- var _a;
2775
2785
  let configFile;
2776
2786
  let markoScriptLang = ScriptLang.js;
2777
2787
  if (docFsPath) {
2778
2788
  configFile = getTSConfigFile(docFsPath);
2779
- if (configFile == null ? void 0 : configFile.endsWith("tsconfig.json")) {
2789
+ if (configFile?.endsWith("tsconfig.json")) {
2780
2790
  markoScriptLang = ScriptLang.ts;
2781
2791
  }
2782
2792
  }
@@ -2804,7 +2814,7 @@ function getTSProject(docFsPath) {
2804
2814
  const potentialGlobalFiles = new Set(
2805
2815
  fileNames.filter((file) => /\.[cm]?ts$/.test(file))
2806
2816
  );
2807
- const tsPkgFile = configFile && ((_a = ts.resolveModuleName("typescript/package.json", configFile, options, ts.sys).resolvedModule) == null ? void 0 : _a.resolvedFileName);
2817
+ const tsPkgFile = configFile && ts.resolveModuleName("typescript/package.json", configFile, options, ts.sys).resolvedModule?.resolvedFileName;
2808
2818
  const defaultLibFile = path8.join(
2809
2819
  tsPkgFile ? path8.join(tsPkgFile, "../lib") : __dirname,
2810
2820
  ts.getDefaultLibFileName(options)
@@ -2854,10 +2864,7 @@ function getTSProject(docFsPath) {
2854
2864
  });
2855
2865
  },
2856
2866
  readDirectory: ts.sys.readDirectory,
2857
- readFile: (filename) => {
2858
- var _a2;
2859
- return (_a2 = get(filenameToURI(filename))) == null ? void 0 : _a2.getText();
2860
- },
2867
+ readFile: (filename) => get(filenameToURI(filename))?.getText(),
2861
2868
  fileExists: (filename) => exists(filenameToURI(filename)),
2862
2869
  getScriptFileNames() {
2863
2870
  const result = new Set(potentialGlobalFiles);
@@ -2873,8 +2880,7 @@ function getTSProject(docFsPath) {
2873
2880
  return [...result];
2874
2881
  },
2875
2882
  getScriptVersion(filename) {
2876
- var _a2;
2877
- return `${((_a2 = get(filenameToURI(filename))) == null ? void 0 : _a2.version) ?? -1}`;
2883
+ return `${get(filenameToURI(filename))?.version ?? -1}`;
2878
2884
  },
2879
2885
  getScriptKind(filename) {
2880
2886
  switch (path8.extname(filename)) {
@@ -2921,7 +2927,6 @@ function filenameToURI(filename) {
2921
2927
  return URI6.file(filename).toString();
2922
2928
  }
2923
2929
  async function getPreferences(scriptLang) {
2924
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
2925
2930
  const configName = scriptLang === ScriptLang.js ? "javascript" : "typescript";
2926
2931
  const [preferencesConfig, suggestConfig, inlayHintsConfig] = await Promise.all([
2927
2932
  getConfig(`${configName}.preferences`),
@@ -2936,8 +2941,8 @@ async function getPreferences(scriptLang) {
2936
2941
  includeCompletionsWithSnippetText: suggestConfig.includeCompletionsWithSnippetText ?? true,
2937
2942
  includeAutomaticOptionalChainCompletions: suggestConfig.includeAutomaticOptionalChainCompletions ?? true,
2938
2943
  includeCompletionsWithInsertText: true,
2939
- includeCompletionsWithClassMemberSnippets: ((_a = suggestConfig.classMemberSnippets) == null ? void 0 : _a.enabled) ?? true,
2940
- includeCompletionsWithObjectLiteralMethodSnippets: ((_b = suggestConfig.objectLiteralMethodSnippets) == null ? void 0 : _b.enabled) ?? true,
2944
+ includeCompletionsWithClassMemberSnippets: suggestConfig.classMemberSnippets?.enabled ?? true,
2945
+ includeCompletionsWithObjectLiteralMethodSnippets: suggestConfig.objectLiteralMethodSnippets?.enabled ?? true,
2941
2946
  useLabelDetailsInCompletionEntries: true,
2942
2947
  allowIncompleteCompletions: true,
2943
2948
  importModuleSpecifierPreference: preferencesConfig.importModuleSpecifierPreference,
@@ -2947,13 +2952,13 @@ async function getPreferences(scriptLang) {
2947
2952
  includePackageJsonAutoImports: preferencesConfig.includePackageJsonAutoImports ?? true,
2948
2953
  provideRefactorNotApplicableReason: true,
2949
2954
  jsxAttributeCompletionStyle: preferencesConfig.jsxAttributeCompletionStyle ?? "auto",
2950
- includeInlayParameterNameHints: ((_c = inlayHintsConfig.parameterNames) == null ? void 0 : _c.enabled) ?? "none",
2951
- includeInlayParameterNameHintsWhenArgumentMatchesName: !((_d = inlayHintsConfig.parameterNames) == null ? void 0 : _d.suppressWhenArgumentMatchesName),
2952
- includeInlayFunctionParameterTypeHints: ((_e = inlayHintsConfig.parameterTypes) == null ? void 0 : _e.enabled) ?? true,
2953
- includeInlayVariableTypeHints: ((_f = inlayHintsConfig.variableTypes) == null ? void 0 : _f.enabled) ?? true,
2954
- includeInlayPropertyDeclarationTypeHints: ((_g = inlayHintsConfig.propertyDeclarationTypes) == null ? void 0 : _g.enabled) ?? true,
2955
- includeInlayFunctionLikeReturnTypeHints: ((_h = inlayHintsConfig.functionLikeReturnTypes) == null ? void 0 : _h.enabled) ?? true,
2956
- includeInlayEnumMemberValueHints: ((_i = inlayHintsConfig.enumMemberValues) == null ? void 0 : _i.enabled) ?? true
2955
+ includeInlayParameterNameHints: inlayHintsConfig.parameterNames?.enabled ?? "none",
2956
+ includeInlayParameterNameHintsWhenArgumentMatchesName: !inlayHintsConfig.parameterNames?.suppressWhenArgumentMatchesName,
2957
+ includeInlayFunctionParameterTypeHints: inlayHintsConfig.parameterTypes?.enabled ?? true,
2958
+ includeInlayVariableTypeHints: inlayHintsConfig.variableTypes?.enabled ?? true,
2959
+ includeInlayPropertyDeclarationTypeHints: inlayHintsConfig.propertyDeclarationTypes?.enabled ?? true,
2960
+ includeInlayFunctionLikeReturnTypeHints: inlayHintsConfig.functionLikeReturnTypes?.enabled ?? true,
2961
+ includeInlayEnumMemberValueHints: inlayHintsConfig.enumMemberValues?.enabled ?? true
2957
2962
  };
2958
2963
  }
2959
2964
  function printDocumentation(docs2, tags) {
@@ -3341,7 +3346,6 @@ var StyleSheetService = {
3341
3346
  }
3342
3347
  },
3343
3348
  doCodeActions(doc, params) {
3344
- var _a;
3345
3349
  for (const extracted of processStyle(doc)) {
3346
3350
  const generatedRange = getGeneratedRange(doc, extracted, params.range);
3347
3351
  if (generatedRange === void 0) continue;
@@ -3352,7 +3356,7 @@ var StyleSheetService = {
3352
3356
  extracted.parsed
3353
3357
  );
3354
3358
  for (const command of result) {
3355
- const edits = (_a = command.arguments) == null ? void 0 : _a[2];
3359
+ const edits = command.arguments?.[2];
3356
3360
  if (edits && Array.isArray(edits) && isTextEdit(edits[0])) {
3357
3361
  command.arguments[2] = getSourceEdits(extracted, edits);
3358
3362
  }
@@ -3380,13 +3384,12 @@ var StyleSheetService = {
3380
3384
  };
3381
3385
  function processStyle(doc) {
3382
3386
  return processDoc(doc, ({ uri, version, parsed, lookup }) => {
3383
- var _a;
3384
3387
  const result = [];
3385
3388
  for (const [ext, extracted] of extractStyle({
3386
3389
  parsed,
3387
3390
  lookup
3388
3391
  })) {
3389
- const service2 = (_a = services[ext]) == null ? void 0 : _a.call(services, {
3392
+ const service2 = services[ext]?.({
3390
3393
  fileSystemProvider: file_system_default,
3391
3394
  clientCapabilities
3392
3395
  });
@@ -3471,18 +3474,12 @@ var service = {
3471
3474
  commands: Object.assign({}, ...plugins.map(({ commands }) => commands)),
3472
3475
  async initialize(params) {
3473
3476
  await Promise.allSettled(
3474
- plugins.map((plugin) => {
3475
- var _a;
3476
- return (_a = plugin.initialize) == null ? void 0 : _a.call(plugin, params);
3477
- })
3477
+ plugins.map((plugin) => plugin.initialize?.(params))
3478
3478
  );
3479
3479
  },
3480
3480
  async doComplete(doc, params, cancel) {
3481
3481
  const results = await Promise.allSettled(
3482
- plugins.map((plugin) => {
3483
- var _a;
3484
- return (_a = plugin.doComplete) == null ? void 0 : _a.call(plugin, doc, params, cancel);
3485
- })
3482
+ plugins.map((plugin) => plugin.doComplete?.(doc, params, cancel))
3486
3483
  );
3487
3484
  if (cancel.isCancellationRequested) return;
3488
3485
  const itemsByLabel = /* @__PURE__ */ new Map();
@@ -3503,10 +3500,9 @@ var service = {
3503
3500
  return { items: [...itemsByLabel.values()], isIncomplete: true };
3504
3501
  },
3505
3502
  async doCompletionResolve(item, cancel) {
3506
- var _a;
3507
3503
  for (const plugin of plugins) {
3508
3504
  try {
3509
- const result = await ((_a = plugin.doCompletionResolve) == null ? void 0 : _a.call(plugin, item, cancel));
3505
+ const result = await plugin.doCompletionResolve?.(item, cancel);
3510
3506
  if (cancel.isCancellationRequested) return;
3511
3507
  if (result) return result;
3512
3508
  } catch {
@@ -3515,10 +3511,7 @@ var service = {
3515
3511
  },
3516
3512
  async findDefinition(doc, params, cancel) {
3517
3513
  const results = await Promise.allSettled(
3518
- plugins.map((plugin) => {
3519
- var _a;
3520
- return (_a = plugin.findDefinition) == null ? void 0 : _a.call(plugin, doc, params, cancel);
3521
- })
3514
+ plugins.map((plugin) => plugin.findDefinition?.(doc, params, cancel))
3522
3515
  );
3523
3516
  if (cancel.isCancellationRequested) return;
3524
3517
  let links;
@@ -3530,10 +3523,7 @@ var service = {
3530
3523
  },
3531
3524
  async findReferences(doc, params, cancel) {
3532
3525
  const results = await Promise.allSettled(
3533
- plugins.map((plugin) => {
3534
- var _a;
3535
- return (_a = plugin.findReferences) == null ? void 0 : _a.call(plugin, doc, params, cancel);
3536
- })
3526
+ plugins.map((plugin) => plugin.findReferences?.(doc, params, cancel))
3537
3527
  );
3538
3528
  if (cancel.isCancellationRequested) return;
3539
3529
  let references;
@@ -3546,10 +3536,7 @@ var service = {
3546
3536
  async findDocumentSymbols(doc, params, cancel) {
3547
3537
  const results = await Promise.allSettled(
3548
3538
  plugins.map(
3549
- (plugin) => {
3550
- var _a;
3551
- return (_a = plugin.findDocumentSymbols) == null ? void 0 : _a.call(plugin, doc, params, cancel);
3552
- }
3539
+ (plugin) => plugin.findDocumentSymbols?.(doc, params, cancel)
3553
3540
  )
3554
3541
  );
3555
3542
  if (cancel.isCancellationRequested) return;
@@ -3562,10 +3549,7 @@ var service = {
3562
3549
  },
3563
3550
  async findDocumentLinks(doc, params, cancel) {
3564
3551
  const results = await Promise.allSettled(
3565
- plugins.map((plugin) => {
3566
- var _a;
3567
- return (_a = plugin.findDocumentLinks) == null ? void 0 : _a.call(plugin, doc, params, cancel);
3568
- })
3552
+ plugins.map((plugin) => plugin.findDocumentLinks?.(doc, params, cancel))
3569
3553
  );
3570
3554
  if (cancel.isCancellationRequested) return;
3571
3555
  let links;
@@ -3578,10 +3562,7 @@ var service = {
3578
3562
  async findDocumentHighlights(doc, params, cancel) {
3579
3563
  const results = await Promise.allSettled(
3580
3564
  plugins.map(
3581
- (plugin) => {
3582
- var _a;
3583
- return (_a = plugin.findDocumentHighlights) == null ? void 0 : _a.call(plugin, doc, params, cancel);
3584
- }
3565
+ (plugin) => plugin.findDocumentHighlights?.(doc, params, cancel)
3585
3566
  )
3586
3567
  );
3587
3568
  if (cancel.isCancellationRequested) return;
@@ -3594,10 +3575,7 @@ var service = {
3594
3575
  },
3595
3576
  async findDocumentColors(doc, params, cancel) {
3596
3577
  const results = await Promise.allSettled(
3597
- plugins.map((plugin) => {
3598
- var _a;
3599
- return (_a = plugin.findDocumentColors) == null ? void 0 : _a.call(plugin, doc, params, cancel);
3600
- })
3578
+ plugins.map((plugin) => plugin.findDocumentColors?.(doc, params, cancel))
3601
3579
  );
3602
3580
  if (cancel.isCancellationRequested) return;
3603
3581
  let colors;
@@ -3610,10 +3588,7 @@ var service = {
3610
3588
  async getColorPresentations(doc, params, cancel) {
3611
3589
  const results = await Promise.allSettled(
3612
3590
  plugins.map(
3613
- (plugin) => {
3614
- var _a;
3615
- return (_a = plugin.getColorPresentations) == null ? void 0 : _a.call(plugin, doc, params, cancel);
3616
- }
3591
+ (plugin) => plugin.getColorPresentations?.(doc, params, cancel)
3617
3592
  )
3618
3593
  );
3619
3594
  if (cancel.isCancellationRequested) return;
@@ -3626,10 +3601,7 @@ var service = {
3626
3601
  },
3627
3602
  async doHover(doc, params, cancel) {
3628
3603
  const results = await Promise.allSettled(
3629
- plugins.map((plugin) => {
3630
- var _a;
3631
- return (_a = plugin.doHover) == null ? void 0 : _a.call(plugin, doc, params, cancel);
3632
- })
3604
+ plugins.map((plugin) => plugin.doHover?.(doc, params, cancel))
3633
3605
  );
3634
3606
  if (cancel.isCancellationRequested) return;
3635
3607
  let hovers;
@@ -3649,10 +3621,7 @@ var service = {
3649
3621
  },
3650
3622
  async doRename(doc, params, cancel) {
3651
3623
  const results = await Promise.allSettled(
3652
- plugins.map((plugin) => {
3653
- var _a;
3654
- return (_a = plugin.doRename) == null ? void 0 : _a.call(plugin, doc, params, cancel);
3655
- })
3624
+ plugins.map((plugin) => plugin.doRename?.(doc, params, cancel))
3656
3625
  );
3657
3626
  if (cancel.isCancellationRequested) return;
3658
3627
  let changes;
@@ -3691,10 +3660,7 @@ var service = {
3691
3660
  },
3692
3661
  async doCodeActions(doc, params, cancel) {
3693
3662
  const results = await Promise.allSettled(
3694
- plugins.map((plugin) => {
3695
- var _a;
3696
- return (_a = plugin.doCodeActions) == null ? void 0 : _a.call(plugin, doc, params, cancel);
3697
- })
3663
+ plugins.map((plugin) => plugin.doCodeActions?.(doc, params, cancel))
3698
3664
  );
3699
3665
  if (cancel.isCancellationRequested) return;
3700
3666
  let actions;
@@ -3706,10 +3672,7 @@ var service = {
3706
3672
  },
3707
3673
  async doValidate(doc) {
3708
3674
  const results = await Promise.allSettled(
3709
- plugins.map((plugin) => {
3710
- var _a;
3711
- return (_a = plugin.doValidate) == null ? void 0 : _a.call(plugin, doc);
3712
- })
3675
+ plugins.map((plugin) => plugin.doValidate?.(doc))
3713
3676
  );
3714
3677
  let diagnostics;
3715
3678
  for (const result of results) {