@marko/language-server 1.3.0 → 1.3.2
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.js +269 -306
- package/dist/index.js.map +3 -3
- package/dist/index.mjs +269 -306
- package/dist/index.mjs.map +3 -3
- package/dist/service/html/axe-rules/axe-rules.d.ts +205 -180
- package/dist/service/html/axe-rules/rule-exceptions.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -313,505 +313,530 @@ var import_jsdom = require("jsdom");
|
|
|
313
313
|
// src/service/html/axe-rules/axe-rules.ts
|
|
314
314
|
var keyboard = {
|
|
315
315
|
/**
|
|
316
|
-
* -
|
|
317
|
-
* - accesskey attribute value should be unique ([url](https://dequeuniversity.com/rules/axe/4.
|
|
316
|
+
* - Ensure every accesskey attribute value is unique
|
|
317
|
+
* - accesskey attribute value should be unique ([url](https://dequeuniversity.com/rules/axe/4.10/accesskeys?application=axeAPI))
|
|
318
318
|
*/
|
|
319
319
|
accesskeys: "accesskeys",
|
|
320
320
|
/**
|
|
321
|
-
* -
|
|
322
|
-
* - Page must have means to bypass repeated blocks ([url](https://dequeuniversity.com/rules/axe/4.
|
|
321
|
+
* - Ensure each page has at least one mechanism for a user to bypass navigation and jump straight to the content
|
|
322
|
+
* - Page must have means to bypass repeated blocks ([url](https://dequeuniversity.com/rules/axe/4.10/bypass?application=axeAPI))
|
|
323
323
|
*/
|
|
324
324
|
bypass: "bypass",
|
|
325
325
|
/**
|
|
326
|
-
* -
|
|
327
|
-
* - Elements in the focus order should have an appropriate role ([url](https://dequeuniversity.com/rules/axe/4.
|
|
326
|
+
* - Ensure elements in the focus order have a role appropriate for interactive content
|
|
327
|
+
* - Elements in the focus order should have an appropriate role ([url](https://dequeuniversity.com/rules/axe/4.10/focus-order-semantics?application=axeAPI))
|
|
328
328
|
*/
|
|
329
329
|
focusOrderSemantics: "focus-order-semantics",
|
|
330
330
|
/**
|
|
331
|
-
* -
|
|
332
|
-
* - Frames with focusable content must not have tabindex=-1 ([url](https://dequeuniversity.com/rules/axe/4.
|
|
331
|
+
* - Ensure `<frame>` and `<iframe>` elements with focusable content do not have tabindex=-1
|
|
332
|
+
* - Frames with focusable content must not have tabindex=-1 ([url](https://dequeuniversity.com/rules/axe/4.10/frame-focusable-content?application=axeAPI))
|
|
333
333
|
*/
|
|
334
334
|
frameFocusableContent: "frame-focusable-content",
|
|
335
335
|
/**
|
|
336
|
-
* -
|
|
337
|
-
* - Interactive controls must not be nested ([url](https://dequeuniversity.com/rules/axe/4.
|
|
336
|
+
* - Ensure interactive controls are not nested as they are not always announced by screen readers or can cause focus problems for assistive technologies
|
|
337
|
+
* - Interactive controls must not be nested ([url](https://dequeuniversity.com/rules/axe/4.10/nested-interactive?application=axeAPI))
|
|
338
338
|
*/
|
|
339
339
|
nestedInteractive: "nested-interactive",
|
|
340
340
|
/**
|
|
341
|
-
* -
|
|
342
|
-
* - All page content should be contained by landmarks ([url](https://dequeuniversity.com/rules/axe/4.
|
|
341
|
+
* - Ensure all page content is contained by landmarks
|
|
342
|
+
* - All page content should be contained by landmarks ([url](https://dequeuniversity.com/rules/axe/4.10/region?application=axeAPI))
|
|
343
343
|
*/
|
|
344
344
|
region: "region",
|
|
345
345
|
/**
|
|
346
346
|
* - Ensure elements that have scrollable content are accessible by keyboard
|
|
347
|
-
* - Scrollable region must have keyboard access ([url](https://dequeuniversity.com/rules/axe/4.
|
|
347
|
+
* - Scrollable region must have keyboard access ([url](https://dequeuniversity.com/rules/axe/4.10/scrollable-region-focusable?application=axeAPI))
|
|
348
348
|
*/
|
|
349
349
|
scrollableRegionFocusable: "scrollable-region-focusable",
|
|
350
350
|
/**
|
|
351
351
|
* - Ensure all skip links have a focusable target
|
|
352
|
-
* - The skip-link target should exist and be focusable ([url](https://dequeuniversity.com/rules/axe/4.
|
|
352
|
+
* - The skip-link target should exist and be focusable ([url](https://dequeuniversity.com/rules/axe/4.10/skip-link?application=axeAPI))
|
|
353
353
|
*/
|
|
354
354
|
skipLink: "skip-link",
|
|
355
355
|
/**
|
|
356
|
-
* -
|
|
357
|
-
* - Elements should not have tabindex greater than zero ([url](https://dequeuniversity.com/rules/axe/4.
|
|
356
|
+
* - Ensure tabindex attribute values are not greater than 0
|
|
357
|
+
* - Elements should not have tabindex greater than zero ([url](https://dequeuniversity.com/rules/axe/4.10/tabindex?application=axeAPI))
|
|
358
358
|
*/
|
|
359
359
|
tabindex: "tabindex"
|
|
360
360
|
};
|
|
361
361
|
var textAlternatives = {
|
|
362
362
|
/**
|
|
363
|
-
* -
|
|
364
|
-
* - Active `<area>` elements must have alternate text ([url](https://dequeuniversity.com/rules/axe/4.
|
|
363
|
+
* - Ensure `<area>` elements of image maps have alternate text
|
|
364
|
+
* - Active `<area>` elements must have alternate text ([url](https://dequeuniversity.com/rules/axe/4.10/area-alt?application=axeAPI))
|
|
365
365
|
*/
|
|
366
366
|
areaAlt: "area-alt",
|
|
367
367
|
/**
|
|
368
|
-
* -
|
|
369
|
-
* - Documents must have `<title>` element to aid in navigation ([url](https://dequeuniversity.com/rules/axe/4.
|
|
368
|
+
* - Ensure each HTML document contains a non-empty `<title>` element
|
|
369
|
+
* - Documents must have `<title>` element to aid in navigation ([url](https://dequeuniversity.com/rules/axe/4.10/document-title?application=axeAPI))
|
|
370
370
|
*/
|
|
371
371
|
documentTitle: "document-title",
|
|
372
372
|
/**
|
|
373
|
-
* -
|
|
374
|
-
* - Frames must have a unique title attribute ([url](https://dequeuniversity.com/rules/axe/4.
|
|
373
|
+
* - Ensure `<iframe>` and `<frame>` elements contain a unique title attribute
|
|
374
|
+
* - Frames must have a unique title attribute ([url](https://dequeuniversity.com/rules/axe/4.10/frame-title-unique?application=axeAPI))
|
|
375
375
|
*/
|
|
376
376
|
frameTitleUnique: "frame-title-unique",
|
|
377
377
|
/**
|
|
378
|
-
* -
|
|
379
|
-
* - Frames must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.
|
|
378
|
+
* - Ensure `<iframe>` and `<frame>` elements have an accessible name
|
|
379
|
+
* - Frames must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/frame-title?application=axeAPI))
|
|
380
380
|
*/
|
|
381
381
|
frameTitle: "frame-title",
|
|
382
382
|
/**
|
|
383
|
-
* -
|
|
384
|
-
* - Images must have alternate text ([url](https://dequeuniversity.com/rules/axe/4.
|
|
383
|
+
* - Ensure `<img>` elements have alternate text or a role of none or presentation
|
|
384
|
+
* - Images must have alternate text ([url](https://dequeuniversity.com/rules/axe/4.10/image-alt?application=axeAPI))
|
|
385
385
|
*/
|
|
386
386
|
imageAlt: "image-alt",
|
|
387
387
|
/**
|
|
388
388
|
* - Ensure image alternative is not repeated as text
|
|
389
|
-
* - Alternative text of images should not be repeated as text ([url](https://dequeuniversity.com/rules/axe/4.
|
|
389
|
+
* - Alternative text of images should not be repeated as text ([url](https://dequeuniversity.com/rules/axe/4.10/image-redundant-alt?application=axeAPI))
|
|
390
390
|
*/
|
|
391
391
|
imageRedundantAlt: "image-redundant-alt",
|
|
392
392
|
/**
|
|
393
|
-
* -
|
|
394
|
-
* - Image buttons must have alternate text ([url](https://dequeuniversity.com/rules/axe/4.
|
|
393
|
+
* - Ensure `<input type="image">` elements have alternate text
|
|
394
|
+
* - Image buttons must have alternate text ([url](https://dequeuniversity.com/rules/axe/4.10/input-image-alt?application=axeAPI))
|
|
395
395
|
*/
|
|
396
396
|
inputImageAlt: "input-image-alt",
|
|
397
397
|
/**
|
|
398
|
-
* -
|
|
399
|
-
* - `<object>` elements must have alternate text ([url](https://dequeuniversity.com/rules/axe/4.
|
|
398
|
+
* - Ensure `<object>` elements have alternate text
|
|
399
|
+
* - `<object>` elements must have alternate text ([url](https://dequeuniversity.com/rules/axe/4.10/object-alt?application=axeAPI))
|
|
400
400
|
*/
|
|
401
401
|
objectAlt: "object-alt",
|
|
402
402
|
/**
|
|
403
|
-
* -
|
|
404
|
-
* - [role=
|
|
403
|
+
* - Ensure [role="img"] elements have alternate text
|
|
404
|
+
* - [role="img"] elements must have an alternative text ([url](https://dequeuniversity.com/rules/axe/4.10/role-img-alt?application=axeAPI))
|
|
405
405
|
*/
|
|
406
406
|
roleImgAlt: "role-img-alt",
|
|
407
407
|
/**
|
|
408
|
-
* -
|
|
409
|
-
* - Server-side image maps must not be used ([url](https://dequeuniversity.com/rules/axe/4.
|
|
408
|
+
* - Ensure that server-side image maps are not used
|
|
409
|
+
* - Server-side image maps must not be used ([url](https://dequeuniversity.com/rules/axe/4.10/server-side-image-map?application=axeAPI))
|
|
410
410
|
*/
|
|
411
411
|
serverSideImageMap: "server-side-image-map",
|
|
412
412
|
/**
|
|
413
|
-
* -
|
|
414
|
-
* - `<svg>` elements with an img role must have an alternative text ([url](https://dequeuniversity.com/rules/axe/4.
|
|
413
|
+
* - Ensure `<svg>` elements with an img, graphics-document or graphics-symbol role have an accessible text
|
|
414
|
+
* - `<svg>` elements with an img role must have an alternative text ([url](https://dequeuniversity.com/rules/axe/4.10/svg-img-alt?application=axeAPI))
|
|
415
415
|
*/
|
|
416
416
|
svgImgAlt: "svg-img-alt",
|
|
417
417
|
/**
|
|
418
|
-
* -
|
|
419
|
-
* - `<video>` elements must have captions ([url](https://dequeuniversity.com/rules/axe/4.
|
|
418
|
+
* - Ensure `<video>` elements have captions
|
|
419
|
+
* - `<video>` elements must have captions ([url](https://dequeuniversity.com/rules/axe/4.10/video-caption?application=axeAPI))
|
|
420
420
|
*/
|
|
421
421
|
videoCaption: "video-caption"
|
|
422
422
|
};
|
|
423
423
|
var aria = {
|
|
424
424
|
/**
|
|
425
|
-
* -
|
|
426
|
-
* - Elements must only use
|
|
425
|
+
* - Ensure an element's role supports its ARIA attributes
|
|
426
|
+
* - Elements must only use supported ARIA attributes ([url](https://dequeuniversity.com/rules/axe/4.10/aria-allowed-attr?application=axeAPI))
|
|
427
427
|
*/
|
|
428
428
|
ariaAllowedAttr: "aria-allowed-attr",
|
|
429
429
|
/**
|
|
430
|
-
* -
|
|
431
|
-
* - ARIA role should be appropriate for the element ([url](https://dequeuniversity.com/rules/axe/4.
|
|
430
|
+
* - Ensure role attribute has an appropriate value for the element
|
|
431
|
+
* - ARIA role should be appropriate for the element ([url](https://dequeuniversity.com/rules/axe/4.10/aria-allowed-role?application=axeAPI))
|
|
432
432
|
*/
|
|
433
433
|
ariaAllowedRole: "aria-allowed-role",
|
|
434
434
|
/**
|
|
435
|
-
* -
|
|
436
|
-
* -
|
|
435
|
+
* - Ensure aria-braillelabel and aria-brailleroledescription have a non-braille equivalent
|
|
436
|
+
* - aria-braille attributes must have a non-braille equivalent ([url](https://dequeuniversity.com/rules/axe/4.10/aria-braille-equivalent?application=axeAPI))
|
|
437
|
+
*/
|
|
438
|
+
ariaBrailleEquivalent: "aria-braille-equivalent",
|
|
439
|
+
/**
|
|
440
|
+
* - Ensure every ARIA button, link and menuitem has an accessible name
|
|
441
|
+
* - ARIA commands must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/aria-command-name?application=axeAPI))
|
|
437
442
|
*/
|
|
438
443
|
ariaCommandName: "aria-command-name",
|
|
439
444
|
/**
|
|
440
|
-
* -
|
|
441
|
-
* - ARIA
|
|
445
|
+
* - Ensure ARIA attributes are used as described in the specification of the element's role
|
|
446
|
+
* - 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))
|
|
447
|
+
*/
|
|
448
|
+
ariaConditionalAttr: "aria-conditional-attr",
|
|
449
|
+
/**
|
|
450
|
+
* - Ensure elements do not use deprecated roles
|
|
451
|
+
* - Deprecated ARIA roles must not be used ([url](https://dequeuniversity.com/rules/axe/4.10/aria-deprecated-role?application=axeAPI))
|
|
452
|
+
*/
|
|
453
|
+
ariaDeprecatedRole: "aria-deprecated-role",
|
|
454
|
+
/**
|
|
455
|
+
* - Ensure every ARIA dialog and alertdialog node has an accessible name
|
|
456
|
+
* - ARIA dialog and alertdialog nodes should have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/aria-dialog-name?application=axeAPI))
|
|
442
457
|
*/
|
|
443
458
|
ariaDialogName: "aria-dialog-name",
|
|
444
459
|
/**
|
|
445
|
-
* -
|
|
446
|
-
* - aria-hidden=
|
|
460
|
+
* - Ensure aria-hidden="true" is not present on the document body.
|
|
461
|
+
* - aria-hidden="true" must not be present on the document body ([url](https://dequeuniversity.com/rules/axe/4.10/aria-hidden-body?application=axeAPI))
|
|
447
462
|
*/
|
|
448
463
|
ariaHiddenBody: "aria-hidden-body",
|
|
449
464
|
/**
|
|
450
|
-
* -
|
|
451
|
-
* - ARIA input fields must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.
|
|
465
|
+
* - Ensure every ARIA input field has an accessible name
|
|
466
|
+
* - ARIA input fields must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/aria-input-field-name?application=axeAPI))
|
|
452
467
|
*/
|
|
453
468
|
ariaInputFieldName: "aria-input-field-name",
|
|
454
469
|
/**
|
|
455
|
-
* -
|
|
456
|
-
* - ARIA meter nodes must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.
|
|
470
|
+
* - Ensure every ARIA meter node has an accessible name
|
|
471
|
+
* - ARIA meter nodes must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/aria-meter-name?application=axeAPI))
|
|
457
472
|
*/
|
|
458
473
|
ariaMeterName: "aria-meter-name",
|
|
459
474
|
/**
|
|
460
|
-
* -
|
|
461
|
-
* - ARIA progressbar nodes must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.
|
|
475
|
+
* - Ensure every ARIA progressbar node has an accessible name
|
|
476
|
+
* - ARIA progressbar nodes must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/aria-progressbar-name?application=axeAPI))
|
|
462
477
|
*/
|
|
463
478
|
ariaProgressbarName: "aria-progressbar-name",
|
|
464
479
|
/**
|
|
465
|
-
* -
|
|
466
|
-
* -
|
|
480
|
+
* - Ensure ARIA attributes are not prohibited for an element's role
|
|
481
|
+
* - Elements must only use permitted ARIA attributes ([url](https://dequeuniversity.com/rules/axe/4.10/aria-prohibited-attr?application=axeAPI))
|
|
482
|
+
*/
|
|
483
|
+
ariaProhibitedAttr: "aria-prohibited-attr",
|
|
484
|
+
/**
|
|
485
|
+
* - Ensure elements with ARIA roles have all required ARIA attributes
|
|
486
|
+
* - Required ARIA attributes must be provided ([url](https://dequeuniversity.com/rules/axe/4.10/aria-required-attr?application=axeAPI))
|
|
467
487
|
*/
|
|
468
488
|
ariaRequiredAttr: "aria-required-attr",
|
|
469
489
|
/**
|
|
470
|
-
* -
|
|
471
|
-
* - Certain ARIA roles must contain particular children ([url](https://dequeuniversity.com/rules/axe/4.
|
|
490
|
+
* - Ensure elements with an ARIA role that require child roles contain them
|
|
491
|
+
* - Certain ARIA roles must contain particular children ([url](https://dequeuniversity.com/rules/axe/4.10/aria-required-children?application=axeAPI))
|
|
472
492
|
*/
|
|
473
493
|
ariaRequiredChildren: "aria-required-children",
|
|
474
494
|
/**
|
|
475
|
-
* -
|
|
476
|
-
* - Certain ARIA roles must be contained by particular parents ([url](https://dequeuniversity.com/rules/axe/4.
|
|
495
|
+
* - Ensure elements with an ARIA role that require parent roles are contained by them
|
|
496
|
+
* - Certain ARIA roles must be contained by particular parents ([url](https://dequeuniversity.com/rules/axe/4.10/aria-required-parent?application=axeAPI))
|
|
477
497
|
*/
|
|
478
498
|
ariaRequiredParent: "aria-required-parent",
|
|
479
499
|
/**
|
|
480
500
|
* - Ensure aria-roledescription is only used on elements with an implicit or explicit role
|
|
481
|
-
* - aria-roledescription must be on elements with a semantic role ([url](https://dequeuniversity.com/rules/axe/4.
|
|
501
|
+
* - aria-roledescription must be on elements with a semantic role ([url](https://dequeuniversity.com/rules/axe/4.10/aria-roledescription?application=axeAPI))
|
|
482
502
|
*/
|
|
483
503
|
ariaRoledescription: "aria-roledescription",
|
|
484
504
|
/**
|
|
485
|
-
* -
|
|
486
|
-
* - ARIA roles used must conform to valid values ([url](https://dequeuniversity.com/rules/axe/4.
|
|
505
|
+
* - Ensure all elements with a role attribute use a valid value
|
|
506
|
+
* - ARIA roles used must conform to valid values ([url](https://dequeuniversity.com/rules/axe/4.10/aria-roles?application=axeAPI))
|
|
487
507
|
*/
|
|
488
508
|
ariaRoles: "aria-roles",
|
|
489
509
|
/**
|
|
490
|
-
* -
|
|
491
|
-
* - "role=text" should have no focusable descendants ([url](https://dequeuniversity.com/rules/axe/4.
|
|
510
|
+
* - Ensure role="text" is used on elements with no focusable descendants
|
|
511
|
+
* - "role=text" should have no focusable descendants ([url](https://dequeuniversity.com/rules/axe/4.10/aria-text?application=axeAPI))
|
|
492
512
|
*/
|
|
493
513
|
ariaText: "aria-text",
|
|
494
514
|
/**
|
|
495
|
-
* -
|
|
496
|
-
* - ARIA toggle fields must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.
|
|
515
|
+
* - Ensure every ARIA toggle field has an accessible name
|
|
516
|
+
* - ARIA toggle fields must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/aria-toggle-field-name?application=axeAPI))
|
|
497
517
|
*/
|
|
498
518
|
ariaToggleFieldName: "aria-toggle-field-name",
|
|
499
519
|
/**
|
|
500
|
-
* -
|
|
501
|
-
* - ARIA tooltip nodes must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.
|
|
520
|
+
* - Ensure every ARIA tooltip node has an accessible name
|
|
521
|
+
* - ARIA tooltip nodes must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/aria-tooltip-name?application=axeAPI))
|
|
502
522
|
*/
|
|
503
523
|
ariaTooltipName: "aria-tooltip-name",
|
|
504
524
|
/**
|
|
505
|
-
* -
|
|
506
|
-
* - ARIA treeitem nodes should have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.
|
|
525
|
+
* - Ensure every ARIA treeitem node has an accessible name
|
|
526
|
+
* - ARIA treeitem nodes should have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/aria-treeitem-name?application=axeAPI))
|
|
507
527
|
*/
|
|
508
528
|
ariaTreeitemName: "aria-treeitem-name",
|
|
509
529
|
/**
|
|
510
|
-
* -
|
|
511
|
-
* - ARIA attributes must conform to valid values ([url](https://dequeuniversity.com/rules/axe/4.
|
|
530
|
+
* - Ensure all ARIA attributes have valid values
|
|
531
|
+
* - ARIA attributes must conform to valid values ([url](https://dequeuniversity.com/rules/axe/4.10/aria-valid-attr-value?application=axeAPI))
|
|
512
532
|
*/
|
|
513
533
|
ariaValidAttrValue: "aria-valid-attr-value",
|
|
514
534
|
/**
|
|
515
|
-
* -
|
|
516
|
-
* - ARIA attributes must conform to valid names ([url](https://dequeuniversity.com/rules/axe/4.
|
|
535
|
+
* - Ensure attributes that begin with aria- are valid ARIA attributes
|
|
536
|
+
* - ARIA attributes must conform to valid names ([url](https://dequeuniversity.com/rules/axe/4.10/aria-valid-attr?application=axeAPI))
|
|
517
537
|
*/
|
|
518
538
|
ariaValidAttr: "aria-valid-attr",
|
|
519
539
|
/**
|
|
520
540
|
* - Elements marked as presentational should not have global ARIA or tabindex to ensure all screen readers ignore them
|
|
521
|
-
* - Ensure elements marked as presentational are consistently ignored ([url](https://dequeuniversity.com/rules/axe/4.
|
|
541
|
+
* - Ensure elements marked as presentational are consistently ignored ([url](https://dequeuniversity.com/rules/axe/4.10/presentation-role-conflict?application=axeAPI))
|
|
522
542
|
*/
|
|
523
543
|
presentationRoleConflict: "presentation-role-conflict"
|
|
524
544
|
};
|
|
525
545
|
var nameRoleValue = {
|
|
526
546
|
/**
|
|
527
|
-
* -
|
|
528
|
-
* - ARIA hidden element must not be focusable or contain focusable elements ([url](https://dequeuniversity.com/rules/axe/4.
|
|
547
|
+
* - Ensure aria-hidden elements are not focusable nor contain focusable elements
|
|
548
|
+
* - ARIA hidden element must not be focusable or contain focusable elements ([url](https://dequeuniversity.com/rules/axe/4.10/aria-hidden-focus?application=axeAPI))
|
|
529
549
|
*/
|
|
530
550
|
ariaHiddenFocus: "aria-hidden-focus",
|
|
531
551
|
/**
|
|
532
|
-
* -
|
|
533
|
-
* - Buttons must have discernible text ([url](https://dequeuniversity.com/rules/axe/4.
|
|
552
|
+
* - Ensure buttons have discernible text
|
|
553
|
+
* - Buttons must have discernible text ([url](https://dequeuniversity.com/rules/axe/4.10/button-name?application=axeAPI))
|
|
534
554
|
*/
|
|
535
555
|
buttonName: "button-name",
|
|
536
556
|
/**
|
|
537
|
-
* -
|
|
538
|
-
* - Headings should not be empty ([url](https://dequeuniversity.com/rules/axe/4.
|
|
557
|
+
* - Ensure headings have discernible text
|
|
558
|
+
* - Headings should not be empty ([url](https://dequeuniversity.com/rules/axe/4.10/empty-heading?application=axeAPI))
|
|
539
559
|
*/
|
|
540
560
|
emptyHeading: "empty-heading",
|
|
541
561
|
/**
|
|
542
|
-
* -
|
|
543
|
-
* - Table header text should not be empty ([url](https://dequeuniversity.com/rules/axe/4.
|
|
562
|
+
* - Ensure table headers have discernible text
|
|
563
|
+
* - Table header text should not be empty ([url](https://dequeuniversity.com/rules/axe/4.10/empty-table-header?application=axeAPI))
|
|
544
564
|
*/
|
|
545
565
|
emptyTableHeader: "empty-table-header",
|
|
546
566
|
/**
|
|
547
|
-
* -
|
|
548
|
-
* - Input buttons must have discernible text ([url](https://dequeuniversity.com/rules/axe/4.
|
|
567
|
+
* - Ensure input buttons have discernible text
|
|
568
|
+
* - Input buttons must have discernible text ([url](https://dequeuniversity.com/rules/axe/4.10/input-button-name?application=axeAPI))
|
|
549
569
|
*/
|
|
550
570
|
inputButtonName: "input-button-name",
|
|
551
571
|
/**
|
|
552
|
-
* -
|
|
553
|
-
* - Links must have discernible text ([url](https://dequeuniversity.com/rules/axe/4.
|
|
572
|
+
* - Ensure links have discernible text
|
|
573
|
+
* - Links must have discernible text ([url](https://dequeuniversity.com/rules/axe/4.10/link-name?application=axeAPI))
|
|
574
|
+
*/
|
|
575
|
+
linkName: "link-name",
|
|
576
|
+
/**
|
|
577
|
+
* - Ensure summary elements have discernible text
|
|
578
|
+
* - Summary elements must have discernible text ([url](https://dequeuniversity.com/rules/axe/4.10/summary-name?application=axeAPI))
|
|
554
579
|
*/
|
|
555
|
-
|
|
580
|
+
summaryName: "summary-name"
|
|
556
581
|
};
|
|
557
582
|
var timeAndMedia = {
|
|
558
583
|
/**
|
|
559
|
-
* -
|
|
560
|
-
* - `<audio>` elements must have a captions track ([url](https://dequeuniversity.com/rules/axe/4.
|
|
584
|
+
* - Ensure `<audio>` elements have captions
|
|
585
|
+
* - `<audio>` elements must have a captions track ([url](https://dequeuniversity.com/rules/axe/4.10/audio-caption?application=axeAPI))
|
|
561
586
|
*/
|
|
562
587
|
audioCaption: "audio-caption",
|
|
563
588
|
/**
|
|
564
|
-
* -
|
|
565
|
-
* - `<blink>` elements are deprecated and must not be used ([url](https://dequeuniversity.com/rules/axe/4.
|
|
589
|
+
* - Ensure `<blink>` elements are not used
|
|
590
|
+
* - `<blink>` elements are deprecated and must not be used ([url](https://dequeuniversity.com/rules/axe/4.10/blink?application=axeAPI))
|
|
566
591
|
*/
|
|
567
592
|
blink: "blink",
|
|
568
593
|
/**
|
|
569
|
-
* -
|
|
570
|
-
* - Delayed refresh must not be used ([url](https://dequeuniversity.com/rules/axe/4.
|
|
594
|
+
* - Ensure `<meta http-equiv="refresh">` is not used for delayed refresh
|
|
595
|
+
* - Delayed refresh must not be used ([url](https://dequeuniversity.com/rules/axe/4.10/meta-refresh-no-exceptions?application=axeAPI))
|
|
571
596
|
*/
|
|
572
597
|
metaRefreshNoExceptions: "meta-refresh-no-exceptions",
|
|
573
598
|
/**
|
|
574
|
-
* -
|
|
575
|
-
* - Delayed refresh under 20 hours must not be used ([url](https://dequeuniversity.com/rules/axe/4.
|
|
599
|
+
* - Ensure `<meta http-equiv="refresh">` is not used for delayed refresh
|
|
600
|
+
* - Delayed refresh under 20 hours must not be used ([url](https://dequeuniversity.com/rules/axe/4.10/meta-refresh?application=axeAPI))
|
|
576
601
|
*/
|
|
577
602
|
metaRefresh: "meta-refresh",
|
|
578
603
|
/**
|
|
579
|
-
* -
|
|
580
|
-
* - `<video>` or `<audio>` elements must not play automatically ([url](https://dequeuniversity.com/rules/axe/4.
|
|
604
|
+
* - Ensure `<video>` or `<audio>` elements do not autoplay audio for more than 3 seconds without a control mechanism to stop or mute the audio
|
|
605
|
+
* - `<video>` or `<audio>` elements must not play automatically ([url](https://dequeuniversity.com/rules/axe/4.10/no-autoplay-audio?application=axeAPI))
|
|
581
606
|
*/
|
|
582
607
|
noAutoplayAudio: "no-autoplay-audio"
|
|
583
608
|
};
|
|
584
609
|
var forms = {
|
|
585
610
|
/**
|
|
586
611
|
* - Ensure the autocomplete attribute is correct and suitable for the form field
|
|
587
|
-
* - autocomplete attribute must be used correctly ([url](https://dequeuniversity.com/rules/axe/4.
|
|
612
|
+
* - autocomplete attribute must be used correctly ([url](https://dequeuniversity.com/rules/axe/4.10/autocomplete-valid?application=axeAPI))
|
|
588
613
|
*/
|
|
589
614
|
autocompleteValid: "autocomplete-valid",
|
|
590
615
|
/**
|
|
591
|
-
* -
|
|
592
|
-
* - Form field must not have multiple label elements ([url](https://dequeuniversity.com/rules/axe/4.
|
|
616
|
+
* - Ensure form field does not have multiple label elements
|
|
617
|
+
* - Form field must not have multiple label elements ([url](https://dequeuniversity.com/rules/axe/4.10/form-field-multiple-labels?application=axeAPI))
|
|
593
618
|
*/
|
|
594
619
|
formFieldMultipleLabels: "form-field-multiple-labels",
|
|
595
620
|
/**
|
|
596
|
-
* -
|
|
597
|
-
* - Form elements should have a visible label ([url](https://dequeuniversity.com/rules/axe/4.
|
|
621
|
+
* - Ensure that every form element has a visible label and is not solely labeled using hidden labels, or the title or aria-describedby attributes
|
|
622
|
+
* - Form elements should have a visible label ([url](https://dequeuniversity.com/rules/axe/4.10/label-title-only?application=axeAPI))
|
|
598
623
|
*/
|
|
599
624
|
labelTitleOnly: "label-title-only",
|
|
600
625
|
/**
|
|
601
|
-
* -
|
|
602
|
-
* - Form elements must have labels ([url](https://dequeuniversity.com/rules/axe/4.
|
|
626
|
+
* - Ensure every form element has a label
|
|
627
|
+
* - Form elements must have labels ([url](https://dequeuniversity.com/rules/axe/4.10/label?application=axeAPI))
|
|
603
628
|
*/
|
|
604
629
|
label: "label",
|
|
605
630
|
/**
|
|
606
|
-
* -
|
|
607
|
-
* - Select element must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.
|
|
631
|
+
* - Ensure select element has an accessible name
|
|
632
|
+
* - Select element must have an accessible name ([url](https://dequeuniversity.com/rules/axe/4.10/select-name?application=axeAPI))
|
|
608
633
|
*/
|
|
609
634
|
selectName: "select-name"
|
|
610
635
|
};
|
|
611
636
|
var structure = {
|
|
612
637
|
/**
|
|
613
638
|
* - Ensure that text spacing set through style attributes can be adjusted with custom stylesheets
|
|
614
|
-
* - Inline text spacing must be adjustable with custom stylesheets ([url](https://dequeuniversity.com/rules/axe/4.
|
|
639
|
+
* - Inline text spacing must be adjustable with custom stylesheets ([url](https://dequeuniversity.com/rules/axe/4.10/avoid-inline-spacing?application=axeAPI))
|
|
615
640
|
*/
|
|
616
641
|
avoidInlineSpacing: "avoid-inline-spacing",
|
|
617
642
|
/**
|
|
618
|
-
* -
|
|
619
|
-
* - CSS Media queries must not lock display orientation ([url](https://dequeuniversity.com/rules/axe/4.
|
|
643
|
+
* - Ensure content is not locked to any specific display orientation, and the content is operable in all display orientations
|
|
644
|
+
* - CSS Media queries must not lock display orientation ([url](https://dequeuniversity.com/rules/axe/4.10/css-orientation-lock?application=axeAPI))
|
|
620
645
|
*/
|
|
621
646
|
cssOrientationLock: "css-orientation-lock",
|
|
622
647
|
/**
|
|
623
|
-
* -
|
|
624
|
-
* - `<dl>` elements must only directly contain properly-ordered `<dt>` and `<dd>` groups, `<script>`, `<template>` or `<div>` elements ([url](https://dequeuniversity.com/rules/axe/4.
|
|
648
|
+
* - Ensure `<dl>` elements are structured correctly
|
|
649
|
+
* - `<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))
|
|
625
650
|
*/
|
|
626
651
|
definitionList: "definition-list",
|
|
627
652
|
/**
|
|
628
|
-
* -
|
|
629
|
-
* - `<dt>` and `<dd>` elements must be contained by a `<dl>` ([url](https://dequeuniversity.com/rules/axe/4.
|
|
653
|
+
* - Ensure `<dt>` and `<dd>` elements are contained by a `<dl>`
|
|
654
|
+
* - `<dt>` and `<dd>` elements must be contained by a `<dl>` ([url](https://dequeuniversity.com/rules/axe/4.10/dlitem?application=axeAPI))
|
|
630
655
|
*/
|
|
631
656
|
dlitem: "dlitem",
|
|
632
657
|
/**
|
|
633
|
-
* -
|
|
634
|
-
* - Frames should be tested with axe-core ([url](https://dequeuniversity.com/rules/axe/4.
|
|
658
|
+
* - Ensure `<iframe>` and `<frame>` elements contain the axe-core script
|
|
659
|
+
* - Frames should be tested with axe-core ([url](https://dequeuniversity.com/rules/axe/4.10/frame-tested?application=axeAPI))
|
|
635
660
|
*/
|
|
636
661
|
frameTested: "frame-tested",
|
|
637
662
|
/**
|
|
638
663
|
* - Informs users about hidden content.
|
|
639
|
-
* - Hidden content on the page should be analyzed ([url](https://dequeuniversity.com/rules/axe/4.
|
|
664
|
+
* - Hidden content on the page should be analyzed ([url](https://dequeuniversity.com/rules/axe/4.10/hidden-content?application=axeAPI))
|
|
640
665
|
*/
|
|
641
666
|
hiddenContent: "hidden-content",
|
|
642
667
|
/**
|
|
643
|
-
* -
|
|
644
|
-
* - `<ul>` and `<ol>` must only directly contain `<li>`, `<script>` or `<template>` elements ([url](https://dequeuniversity.com/rules/axe/4.
|
|
668
|
+
* - Ensure that lists are structured correctly
|
|
669
|
+
* - `<ul>` and `<ol>` must only directly contain `<li>`, `<script>` or `<template>` elements ([url](https://dequeuniversity.com/rules/axe/4.10/list?application=axeAPI))
|
|
645
670
|
*/
|
|
646
671
|
list: "list",
|
|
647
672
|
/**
|
|
648
|
-
* -
|
|
649
|
-
* - `<li>` elements must be contained in a `<ul>` or `<ol>` ([url](https://dequeuniversity.com/rules/axe/4.
|
|
673
|
+
* - Ensure `<li>` elements are used semantically
|
|
674
|
+
* - `<li>` elements must be contained in a `<ul>` or `<ol>` ([url](https://dequeuniversity.com/rules/axe/4.10/listitem?application=axeAPI))
|
|
650
675
|
*/
|
|
651
676
|
listitem: "listitem"
|
|
652
677
|
};
|
|
653
678
|
var parsing = {
|
|
654
679
|
/**
|
|
655
|
-
* -
|
|
656
|
-
* - IDs of active elements must be unique ([url](https://dequeuniversity.com/rules/axe/4.
|
|
680
|
+
* - Ensure every id attribute value of active elements is unique
|
|
681
|
+
* - IDs of active elements must be unique ([url](https://dequeuniversity.com/rules/axe/4.10/duplicate-id-active?application=axeAPI))
|
|
657
682
|
*/
|
|
658
683
|
duplicateIdActive: "duplicate-id-active",
|
|
659
684
|
/**
|
|
660
|
-
* -
|
|
661
|
-
* - IDs used in ARIA and labels must be unique ([url](https://dequeuniversity.com/rules/axe/4.
|
|
685
|
+
* - Ensure every id attribute value used in ARIA and in labels is unique
|
|
686
|
+
* - IDs used in ARIA and labels must be unique ([url](https://dequeuniversity.com/rules/axe/4.10/duplicate-id-aria?application=axeAPI))
|
|
662
687
|
*/
|
|
663
688
|
duplicateIdAria: "duplicate-id-aria",
|
|
664
689
|
/**
|
|
665
|
-
* -
|
|
666
|
-
* - id attribute value must be unique ([url](https://dequeuniversity.com/rules/axe/4.
|
|
690
|
+
* - Ensure every id attribute value is unique
|
|
691
|
+
* - id attribute value must be unique ([url](https://dequeuniversity.com/rules/axe/4.10/duplicate-id?application=axeAPI))
|
|
667
692
|
*/
|
|
668
693
|
duplicateId: "duplicate-id",
|
|
669
694
|
/**
|
|
670
|
-
* -
|
|
671
|
-
* - `<marquee>` elements are deprecated and must not be used ([url](https://dequeuniversity.com/rules/axe/4.
|
|
695
|
+
* - Ensure `<marquee>` elements are not used
|
|
696
|
+
* - `<marquee>` elements are deprecated and must not be used ([url](https://dequeuniversity.com/rules/axe/4.10/marquee?application=axeAPI))
|
|
672
697
|
*/
|
|
673
698
|
marquee: "marquee"
|
|
674
699
|
};
|
|
675
700
|
var semantics = {
|
|
676
701
|
/**
|
|
677
|
-
* -
|
|
678
|
-
* - Heading levels should only increase by one ([url](https://dequeuniversity.com/rules/axe/4.
|
|
702
|
+
* - Ensure the order of headings is semantically correct
|
|
703
|
+
* - Heading levels should only increase by one ([url](https://dequeuniversity.com/rules/axe/4.10/heading-order?application=axeAPI))
|
|
679
704
|
*/
|
|
680
705
|
headingOrder: "heading-order",
|
|
681
706
|
/**
|
|
682
707
|
* - Ensure that links with the same accessible name serve a similar purpose
|
|
683
|
-
* - Links with the same name must have a similar purpose ([url](https://dequeuniversity.com/rules/axe/4.
|
|
708
|
+
* - Links with the same name must have a similar purpose ([url](https://dequeuniversity.com/rules/axe/4.10/identical-links-same-purpose?application=axeAPI))
|
|
684
709
|
*/
|
|
685
710
|
identicalLinksSamePurpose: "identical-links-same-purpose",
|
|
686
711
|
/**
|
|
687
|
-
* -
|
|
688
|
-
* - Elements must have their visible text as part of their accessible name ([url](https://dequeuniversity.com/rules/axe/4.
|
|
712
|
+
* - Ensure that elements labelled through their content must have their visible text as part of their accessible name
|
|
713
|
+
* - 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))
|
|
689
714
|
*/
|
|
690
715
|
labelContentNameMismatch: "label-content-name-mismatch",
|
|
691
716
|
/**
|
|
692
|
-
* -
|
|
693
|
-
* - Banner landmark should not be contained in another landmark ([url](https://dequeuniversity.com/rules/axe/4.
|
|
717
|
+
* - Ensure the banner landmark is at top level
|
|
718
|
+
* - Banner landmark should not be contained in another landmark ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-banner-is-top-level?application=axeAPI))
|
|
694
719
|
*/
|
|
695
720
|
landmarkBannerIsTopLevel: "landmark-banner-is-top-level",
|
|
696
721
|
/**
|
|
697
|
-
* -
|
|
698
|
-
* - Aside should not be contained in another landmark ([url](https://dequeuniversity.com/rules/axe/4.
|
|
722
|
+
* - Ensure the complementary landmark or aside is at top level
|
|
723
|
+
* - Aside should not be contained in another landmark ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-complementary-is-top-level?application=axeAPI))
|
|
699
724
|
*/
|
|
700
725
|
landmarkComplementaryIsTopLevel: "landmark-complementary-is-top-level",
|
|
701
726
|
/**
|
|
702
|
-
* -
|
|
703
|
-
* - Contentinfo landmark should not be contained in another landmark ([url](https://dequeuniversity.com/rules/axe/4.
|
|
727
|
+
* - Ensure the contentinfo landmark is at top level
|
|
728
|
+
* - Contentinfo landmark should not be contained in another landmark ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-contentinfo-is-top-level?application=axeAPI))
|
|
704
729
|
*/
|
|
705
730
|
landmarkContentinfoIsTopLevel: "landmark-contentinfo-is-top-level",
|
|
706
731
|
/**
|
|
707
|
-
* -
|
|
708
|
-
* - Main landmark should not be contained in another landmark ([url](https://dequeuniversity.com/rules/axe/4.
|
|
732
|
+
* - Ensure the main landmark is at top level
|
|
733
|
+
* - Main landmark should not be contained in another landmark ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-main-is-top-level?application=axeAPI))
|
|
709
734
|
*/
|
|
710
735
|
landmarkMainIsTopLevel: "landmark-main-is-top-level",
|
|
711
736
|
/**
|
|
712
|
-
* -
|
|
713
|
-
* - Document should not have more than one banner landmark ([url](https://dequeuniversity.com/rules/axe/4.
|
|
737
|
+
* - Ensure the document has at most one banner landmark
|
|
738
|
+
* - Document should not have more than one banner landmark ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-no-duplicate-banner?application=axeAPI))
|
|
714
739
|
*/
|
|
715
740
|
landmarkNoDuplicateBanner: "landmark-no-duplicate-banner",
|
|
716
741
|
/**
|
|
717
|
-
* -
|
|
718
|
-
* - Document should not have more than one contentinfo landmark ([url](https://dequeuniversity.com/rules/axe/4.
|
|
742
|
+
* - Ensure the document has at most one contentinfo landmark
|
|
743
|
+
* - Document should not have more than one contentinfo landmark ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-no-duplicate-contentinfo?application=axeAPI))
|
|
719
744
|
*/
|
|
720
745
|
landmarkNoDuplicateContentinfo: "landmark-no-duplicate-contentinfo",
|
|
721
746
|
/**
|
|
722
|
-
* -
|
|
723
|
-
* - Document should not have more than one main landmark ([url](https://dequeuniversity.com/rules/axe/4.
|
|
747
|
+
* - Ensure the document has at most one main landmark
|
|
748
|
+
* - Document should not have more than one main landmark ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-no-duplicate-main?application=axeAPI))
|
|
724
749
|
*/
|
|
725
750
|
landmarkNoDuplicateMain: "landmark-no-duplicate-main",
|
|
726
751
|
/**
|
|
727
|
-
* -
|
|
728
|
-
* - Document should have one main landmark ([url](https://dequeuniversity.com/rules/axe/4.
|
|
752
|
+
* - Ensure the document has a main landmark
|
|
753
|
+
* - Document should have one main landmark ([url](https://dequeuniversity.com/rules/axe/4.10/landmark-one-main?application=axeAPI))
|
|
729
754
|
*/
|
|
730
755
|
landmarkOneMain: "landmark-one-main",
|
|
731
756
|
/**
|
|
732
|
-
* -
|
|
733
|
-
* -
|
|
757
|
+
* - Ensure landmarks are unique
|
|
758
|
+
* - 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))
|
|
734
759
|
*/
|
|
735
760
|
landmarkUnique: "landmark-unique",
|
|
736
761
|
/**
|
|
737
762
|
* - Ensure bold, italic text and font-size is not used to style `<p>` elements as a heading
|
|
738
|
-
* - Styled `<p>` elements must not be used as headings ([url](https://dequeuniversity.com/rules/axe/4.
|
|
763
|
+
* - Styled `<p>` elements must not be used as headings ([url](https://dequeuniversity.com/rules/axe/4.10/p-as-heading?application=axeAPI))
|
|
739
764
|
*/
|
|
740
765
|
pAsHeading: "p-as-heading",
|
|
741
766
|
/**
|
|
742
767
|
* - Ensure that the page, or at least one of its frames contains a level-one heading
|
|
743
|
-
* - Page should contain a level-one heading ([url](https://dequeuniversity.com/rules/axe/4.
|
|
768
|
+
* - Page should contain a level-one heading ([url](https://dequeuniversity.com/rules/axe/4.10/page-has-heading-one?application=axeAPI))
|
|
744
769
|
*/
|
|
745
770
|
pageHasHeadingOne: "page-has-heading-one"
|
|
746
771
|
};
|
|
747
772
|
var language = {
|
|
748
773
|
/**
|
|
749
|
-
* -
|
|
750
|
-
* - `<html>` element must have a lang attribute ([url](https://dequeuniversity.com/rules/axe/4.
|
|
774
|
+
* - Ensure every HTML document has a lang attribute
|
|
775
|
+
* - `<html>` element must have a lang attribute ([url](https://dequeuniversity.com/rules/axe/4.10/html-has-lang?application=axeAPI))
|
|
751
776
|
*/
|
|
752
777
|
htmlHasLang: "html-has-lang",
|
|
753
778
|
/**
|
|
754
|
-
* -
|
|
755
|
-
* - `<html>` element must have a valid value for the lang attribute ([url](https://dequeuniversity.com/rules/axe/4.
|
|
779
|
+
* - Ensure the lang attribute of the `<html>` element has a valid value
|
|
780
|
+
* - `<html>` element must have a valid value for the lang attribute ([url](https://dequeuniversity.com/rules/axe/4.10/html-lang-valid?application=axeAPI))
|
|
756
781
|
*/
|
|
757
782
|
htmlLangValid: "html-lang-valid",
|
|
758
783
|
/**
|
|
759
784
|
* - Ensure that HTML elements with both valid lang and xml:lang attributes agree on the base language of the page
|
|
760
|
-
* - HTML elements with lang and xml:lang must have the same base language ([url](https://dequeuniversity.com/rules/axe/4.
|
|
785
|
+
* - 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))
|
|
761
786
|
*/
|
|
762
787
|
htmlXmlLangMismatch: "html-xml-lang-mismatch",
|
|
763
788
|
/**
|
|
764
|
-
* -
|
|
765
|
-
* - lang attribute must have a valid value ([url](https://dequeuniversity.com/rules/axe/4.
|
|
789
|
+
* - Ensure lang attributes have valid values
|
|
790
|
+
* - lang attribute must have a valid value ([url](https://dequeuniversity.com/rules/axe/4.10/valid-lang?application=axeAPI))
|
|
766
791
|
*/
|
|
767
792
|
validLang: "valid-lang"
|
|
768
793
|
};
|
|
769
794
|
var sensoryAndVisualCues = {
|
|
770
795
|
/**
|
|
771
|
-
* -
|
|
772
|
-
* - Users should be able to zoom and scale the text up to 500% ([url](https://dequeuniversity.com/rules/axe/4.
|
|
796
|
+
* - Ensure `<meta name="viewport">` can scale a significant amount
|
|
797
|
+
* - 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))
|
|
773
798
|
*/
|
|
774
799
|
metaViewportLarge: "meta-viewport-large",
|
|
775
800
|
/**
|
|
776
|
-
* -
|
|
777
|
-
* - Zooming and scaling must not be disabled ([url](https://dequeuniversity.com/rules/axe/4.
|
|
801
|
+
* - Ensure `<meta name="viewport">` does not disable text scaling and zooming
|
|
802
|
+
* - Zooming and scaling must not be disabled ([url](https://dequeuniversity.com/rules/axe/4.10/meta-viewport?application=axeAPI))
|
|
778
803
|
*/
|
|
779
804
|
metaViewport: "meta-viewport",
|
|
780
805
|
/**
|
|
781
|
-
* - Ensure touch
|
|
782
|
-
* - All touch targets must be 24px large, or leave sufficient space ([url](https://dequeuniversity.com/rules/axe/4.
|
|
806
|
+
* - Ensure touch targets have sufficient size and space
|
|
807
|
+
* - All touch targets must be 24px large, or leave sufficient space ([url](https://dequeuniversity.com/rules/axe/4.10/target-size?application=axeAPI))
|
|
783
808
|
*/
|
|
784
809
|
targetSize: "target-size"
|
|
785
810
|
};
|
|
786
811
|
var tables = {
|
|
787
812
|
/**
|
|
788
|
-
* -
|
|
789
|
-
* - scope attribute should be used correctly ([url](https://dequeuniversity.com/rules/axe/4.
|
|
813
|
+
* - Ensure the scope attribute is used correctly on tables
|
|
814
|
+
* - scope attribute should be used correctly ([url](https://dequeuniversity.com/rules/axe/4.10/scope-attr-valid?application=axeAPI))
|
|
790
815
|
*/
|
|
791
816
|
scopeAttrValid: "scope-attr-valid",
|
|
792
817
|
/**
|
|
793
818
|
* - Ensure the `<caption>` element does not contain the same text as the summary attribute
|
|
794
|
-
* -
|
|
819
|
+
* - Tables should not have the same summary and caption ([url](https://dequeuniversity.com/rules/axe/4.10/table-duplicate-name?application=axeAPI))
|
|
795
820
|
*/
|
|
796
821
|
tableDuplicateName: "table-duplicate-name",
|
|
797
822
|
/**
|
|
798
823
|
* - Ensure that tables with a caption use the `<caption>` element.
|
|
799
|
-
* - Data or header cells must not be used to give caption to a data table. ([url](https://dequeuniversity.com/rules/axe/4.
|
|
824
|
+
* - 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))
|
|
800
825
|
*/
|
|
801
826
|
tableFakeCaption: "table-fake-caption",
|
|
802
827
|
/**
|
|
803
828
|
* - Ensure that each non-empty data cell in a `<table>` larger than 3 by 3 has one or more table headers
|
|
804
|
-
* - Non-empty `<td>` elements in larger `<table>` must have an associated table header ([url](https://dequeuniversity.com/rules/axe/4.
|
|
829
|
+
* - 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))
|
|
805
830
|
*/
|
|
806
831
|
tdHasHeader: "td-has-header",
|
|
807
832
|
/**
|
|
808
833
|
* - Ensure that each cell in a table that uses the headers attribute refers only to other cells in that table
|
|
809
|
-
* - Table cells that use the headers attribute must only refer to cells in the same table ([url](https://dequeuniversity.com/rules/axe/4.
|
|
834
|
+
* - 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))
|
|
810
835
|
*/
|
|
811
836
|
tdHeadersAttr: "td-headers-attr",
|
|
812
837
|
/**
|
|
813
838
|
* - Ensure that `<th>` elements and elements with role=columnheader/rowheader have data cells they describe
|
|
814
|
-
* - Table headers in a data table must refer to data cells ([url](https://dequeuniversity.com/rules/axe/4.
|
|
839
|
+
* - 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))
|
|
815
840
|
*/
|
|
816
841
|
thHasDataCells: "th-has-data-cells"
|
|
817
842
|
};
|
|
@@ -819,12 +844,16 @@ var tables = {
|
|
|
819
844
|
// src/service/html/axe-rules/rule-exceptions.ts
|
|
820
845
|
var ruleExceptions = {
|
|
821
846
|
[aria.ariaAllowedRole]: { dynamicAttrs: ["role"] },
|
|
847
|
+
[aria.ariaBrailleEquivalent]: { attrSpread: true },
|
|
822
848
|
[aria.ariaCommandName]: { unknownBody: true, attrSpread: true },
|
|
849
|
+
[aria.ariaConditionalAttr]: { unknownBody: true, attrSpread: true },
|
|
850
|
+
[aria.ariaDeprecatedRole]: { dynamicAttrs: ["role"] },
|
|
823
851
|
[aria.ariaDialogName]: { unknownBody: true, attrSpread: true },
|
|
824
852
|
[aria.ariaHiddenBody]: {},
|
|
825
853
|
[aria.ariaInputFieldName]: { unknownBody: true, attrSpread: true },
|
|
826
854
|
[aria.ariaMeterName]: { unknownBody: true, attrSpread: true },
|
|
827
855
|
[aria.ariaProgressbarName]: { unknownBody: true, attrSpread: true },
|
|
856
|
+
[aria.ariaProhibitedAttr]: {},
|
|
828
857
|
[aria.ariaRequiredAttr]: { attrSpread: true },
|
|
829
858
|
[aria.ariaRequiredChildren]: { unknownBody: true },
|
|
830
859
|
[aria.ariaRoles]: { dynamicAttrs: ["role"] },
|
|
@@ -836,7 +865,6 @@ var ruleExceptions = {
|
|
|
836
865
|
[forms.autocompleteValid]: {},
|
|
837
866
|
[forms.formFieldMultipleLabels]: {},
|
|
838
867
|
[keyboard.accesskeys]: {},
|
|
839
|
-
[keyboard.focusOrderSemantics]: {},
|
|
840
868
|
[keyboard.frameFocusableContent]: { unknownBody: true },
|
|
841
869
|
[keyboard.skipLink]: { unknownBody: true },
|
|
842
870
|
[keyboard.tabindex]: {},
|
|
@@ -853,9 +881,9 @@ var ruleExceptions = {
|
|
|
853
881
|
attrSpread: true
|
|
854
882
|
},
|
|
855
883
|
[nameRoleValue.linkName]: { unknownBody: true, attrSpread: true },
|
|
884
|
+
[nameRoleValue.summaryName]: { unknownBody: true, attrSpread: true },
|
|
856
885
|
[parsing.marquee]: {},
|
|
857
886
|
[semantics.identicalLinksSamePurpose]: {},
|
|
858
|
-
[semantics.labelContentNameMismatch]: { unknownBody: true },
|
|
859
887
|
[semantics.landmarkNoDuplicateBanner]: {},
|
|
860
888
|
[semantics.landmarkNoDuplicateContentinfo]: {},
|
|
861
889
|
[semantics.landmarkNoDuplicateMain]: {},
|
|
@@ -866,7 +894,6 @@ var ruleExceptions = {
|
|
|
866
894
|
[structure.list]: { unknownBody: true },
|
|
867
895
|
[tables.scopeAttrValid]: {},
|
|
868
896
|
[tables.tableDuplicateName]: { unknownBody: true },
|
|
869
|
-
[tables.tableFakeCaption]: { unknownBody: true },
|
|
870
897
|
[tables.thHasDataCells]: { unknownBody: true },
|
|
871
898
|
[textAlternatives.areaAlt]: { attrSpread: true },
|
|
872
899
|
[textAlternatives.documentTitle]: { unknownBody: true },
|
|
@@ -921,15 +948,14 @@ var HTMLService = {
|
|
|
921
948
|
const violations = await getViolationNodes(Object.keys(ruleExceptions));
|
|
922
949
|
release();
|
|
923
950
|
return violations.flatMap((result) => {
|
|
924
|
-
var _a;
|
|
925
951
|
const { element } = result;
|
|
926
952
|
if (!element) return [];
|
|
927
953
|
const ruleId = result.ruleId;
|
|
928
954
|
if (element.dataset.markoNodeId) {
|
|
929
955
|
const details = nodeDetails[element.dataset.markoNodeId];
|
|
930
|
-
if (ruleExceptions[ruleId].attrSpread && details.hasDynamicAttrs || ruleExceptions[ruleId].unknownBody && details.hasDynamicBody ||
|
|
956
|
+
if (ruleExceptions[ruleId].attrSpread && details.hasDynamicAttrs || ruleExceptions[ruleId].unknownBody && details.hasDynamicBody || ruleExceptions[ruleId].dynamicAttrs?.some(
|
|
931
957
|
(attr) => element.getAttribute(attr) === "dynamic"
|
|
932
|
-
))
|
|
958
|
+
)) {
|
|
933
959
|
return [];
|
|
934
960
|
}
|
|
935
961
|
}
|
|
@@ -1103,8 +1129,7 @@ var linkedAttrs = /* @__PURE__ */ new Map([
|
|
|
1103
1129
|
["poster", /* @__PURE__ */ new Set(["video"])]
|
|
1104
1130
|
]);
|
|
1105
1131
|
function isDocumentLinkAttr(code, tag, attr) {
|
|
1106
|
-
|
|
1107
|
-
return tag.nameText && attr.type === import_language_tools4.NodeType.AttrNamed && ((_a = attr.value) == null ? void 0 : _a.type) === import_language_tools4.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;
|
|
1132
|
+
return tag.nameText && attr.type === import_language_tools4.NodeType.AttrNamed && attr.value?.type === import_language_tools4.NodeType.AttrValue && /^['"]$/.test(code[attr.value.value.start]) && linkedAttrs.get(code.slice(attr.name.start, attr.name.end))?.has(tag.nameText) || false;
|
|
1108
1133
|
}
|
|
1109
1134
|
|
|
1110
1135
|
// src/utils/file-system.ts
|
|
@@ -1226,7 +1251,6 @@ function getTagNameCompletion({
|
|
|
1226
1251
|
showAutoComplete,
|
|
1227
1252
|
importer
|
|
1228
1253
|
}) {
|
|
1229
|
-
var _a;
|
|
1230
1254
|
let label = tag.isNestedTag ? `@${tag.name}` : tag.name;
|
|
1231
1255
|
const fileForTag = tag.template || tag.renderer || tag.filePath;
|
|
1232
1256
|
const fileURIForTag = import_vscode_uri3.URI.file(fileForTag).toString();
|
|
@@ -1246,7 +1270,7 @@ function getTagNameCompletion({
|
|
|
1246
1270
|
|
|
1247
1271
|
${tag.description}`;
|
|
1248
1272
|
}
|
|
1249
|
-
const autocomplete = showAutoComplete ?
|
|
1273
|
+
const autocomplete = showAutoComplete ? tag.autocomplete?.[0] : void 0;
|
|
1250
1274
|
if (autocomplete) {
|
|
1251
1275
|
if (autocomplete.displayText) {
|
|
1252
1276
|
label = autocomplete.displayText;
|
|
@@ -1268,7 +1292,7 @@ ${autocomplete.description}`;
|
|
|
1268
1292
|
tags: tag.deprecated ? deprecated : void 0,
|
|
1269
1293
|
insertTextFormat: autocomplete ? import_vscode_languageserver4.InsertTextFormat.Snippet : void 0,
|
|
1270
1294
|
kind: tag.html ? import_vscode_languageserver4.CompletionItemKind.Property : import_vscode_languageserver4.CompletionItemKind.Class,
|
|
1271
|
-
textEdit: range && import_vscode_languageserver4.TextEdit.replace(range,
|
|
1295
|
+
textEdit: range && import_vscode_languageserver4.TextEdit.replace(range, autocomplete?.snippet || label)
|
|
1272
1296
|
};
|
|
1273
1297
|
}
|
|
1274
1298
|
|
|
@@ -1278,7 +1302,6 @@ function Import({
|
|
|
1278
1302
|
node,
|
|
1279
1303
|
file: { parsed, filename, lookup }
|
|
1280
1304
|
}) {
|
|
1281
|
-
var _a;
|
|
1282
1305
|
const value = parsed.read(node);
|
|
1283
1306
|
const match = importTagReg.exec(value);
|
|
1284
1307
|
if (match) {
|
|
@@ -1290,7 +1313,7 @@ function Import({
|
|
|
1290
1313
|
});
|
|
1291
1314
|
const result = [];
|
|
1292
1315
|
for (const tag of lookup.getTagsSorted()) {
|
|
1293
|
-
if ((tag.template || tag.renderer) && !(tag.html || tag.parser || tag.translator || tag.isNestedTag || tag.name === "*" ||
|
|
1316
|
+
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))) {
|
|
1294
1317
|
const completion = getTagNameCompletion({
|
|
1295
1318
|
tag,
|
|
1296
1319
|
importer: filename
|
|
@@ -1310,14 +1333,13 @@ function OpenTagName({
|
|
|
1310
1333
|
node,
|
|
1311
1334
|
file: { parsed, filename, lookup }
|
|
1312
1335
|
}) {
|
|
1313
|
-
var _a;
|
|
1314
1336
|
const tag = node.parent;
|
|
1315
1337
|
const range = parsed.locationAt(node);
|
|
1316
1338
|
const isAttrTag = tag.type === import_language_tools5.NodeType.AttrTag;
|
|
1317
1339
|
const result = [];
|
|
1318
1340
|
if (isAttrTag) {
|
|
1319
1341
|
let parentTag = tag.owner;
|
|
1320
|
-
while (
|
|
1342
|
+
while (parentTag?.type === import_language_tools5.NodeType.AttrTag) parentTag = parentTag.owner;
|
|
1321
1343
|
const parentTagDef = parentTag && parentTag.nameText && lookup.getTag(parentTag.nameText);
|
|
1322
1344
|
if (parentTagDef) {
|
|
1323
1345
|
const { nestedTags } = parentTagDef;
|
|
@@ -1338,7 +1360,7 @@ function OpenTagName({
|
|
|
1338
1360
|
} else {
|
|
1339
1361
|
const skipStatements = !(tag.concise && tag.parent.type === import_language_tools5.NodeType.Program);
|
|
1340
1362
|
for (const tag2 of lookup.getTagsSorted()) {
|
|
1341
|
-
if (!(tag2.name === "*" || tag2.isNestedTag || skipStatements &&
|
|
1363
|
+
if (!(tag2.name === "*" || tag2.isNestedTag || skipStatements && tag2.parseOptions?.statement || tag2.name[0] === "_" && /^@?marko[/-]|[\\/]node_modules[\\/]/.test(tag2.filePath))) {
|
|
1342
1364
|
const completion = getTagNameCompletion({
|
|
1343
1365
|
tag: tag2,
|
|
1344
1366
|
range,
|
|
@@ -1407,17 +1429,16 @@ var handlers = {
|
|
|
1407
1429
|
Import
|
|
1408
1430
|
};
|
|
1409
1431
|
var doComplete = async (doc, params) => {
|
|
1410
|
-
var _a;
|
|
1411
1432
|
const file = getMarkoFile(doc);
|
|
1412
1433
|
const offset = doc.offsetAt(params.position);
|
|
1413
1434
|
const node = file.parsed.nodeAt(offset);
|
|
1414
1435
|
return {
|
|
1415
|
-
items: await
|
|
1436
|
+
items: await handlers[import_language_tools7.NodeType[node.type]]?.({
|
|
1416
1437
|
file,
|
|
1417
1438
|
params,
|
|
1418
1439
|
offset,
|
|
1419
1440
|
node
|
|
1420
|
-
})
|
|
1441
|
+
}) || [],
|
|
1421
1442
|
isIncomplete: true
|
|
1422
1443
|
};
|
|
1423
1444
|
};
|
|
@@ -1477,7 +1498,7 @@ function AttrName2({
|
|
|
1477
1498
|
if (!attrDef) {
|
|
1478
1499
|
return;
|
|
1479
1500
|
}
|
|
1480
|
-
const attrEntryFile = attrDef.filePath ||
|
|
1501
|
+
const attrEntryFile = attrDef.filePath || tagDef?.filePath;
|
|
1481
1502
|
if (!attrEntryFile) {
|
|
1482
1503
|
return;
|
|
1483
1504
|
}
|
|
@@ -1518,7 +1539,7 @@ function OpenTagName2({
|
|
|
1518
1539
|
let range = START_LOCATION;
|
|
1519
1540
|
if (tag.type === import_language_tools9.NodeType.AttrTag) {
|
|
1520
1541
|
let parentTag = tag.owner;
|
|
1521
|
-
while (
|
|
1542
|
+
while (parentTag?.type === import_language_tools9.NodeType.AttrTag) parentTag = parentTag.owner;
|
|
1522
1543
|
tagDef = parentTag && parentTag.nameText ? lookup.getTag(parentTag.nameText) : void 0;
|
|
1523
1544
|
} else {
|
|
1524
1545
|
tagDef = tag.nameText ? lookup.getTag(tag.nameText) : void 0;
|
|
@@ -1559,16 +1580,15 @@ var handlers2 = {
|
|
|
1559
1580
|
AttrName: AttrName2
|
|
1560
1581
|
};
|
|
1561
1582
|
var findDefinition = async (doc, params) => {
|
|
1562
|
-
var _a;
|
|
1563
1583
|
const file = getMarkoFile(doc);
|
|
1564
1584
|
const offset = doc.offsetAt(params.position);
|
|
1565
1585
|
const node = file.parsed.nodeAt(offset);
|
|
1566
|
-
return await
|
|
1586
|
+
return await handlers2[import_language_tools10.NodeType[node.type]]?.({
|
|
1567
1587
|
file,
|
|
1568
1588
|
params,
|
|
1569
1589
|
offset,
|
|
1570
1590
|
node
|
|
1571
|
-
})
|
|
1591
|
+
}) || [];
|
|
1572
1592
|
};
|
|
1573
1593
|
|
|
1574
1594
|
// src/service/marko/document-links.ts
|
|
@@ -1666,13 +1686,12 @@ function extractDocumentSymbols({
|
|
|
1666
1686
|
const symbols = [];
|
|
1667
1687
|
const { program } = parsed;
|
|
1668
1688
|
const visit = (node) => {
|
|
1669
|
-
var _a, _b;
|
|
1670
1689
|
switch (node.type) {
|
|
1671
1690
|
case import_language_tools12.NodeType.Tag:
|
|
1672
1691
|
case import_language_tools12.NodeType.AttrTag:
|
|
1673
1692
|
symbols.push({
|
|
1674
|
-
name: (node.type === import_language_tools12.NodeType.AttrTag ?
|
|
1675
|
-
kind: node.nameText &&
|
|
1693
|
+
name: (node.type === import_language_tools12.NodeType.AttrTag ? node.nameText?.slice(node.nameText.indexOf("@")) : node.nameText) || "<${...}>",
|
|
1694
|
+
kind: node.nameText && lookup.getTag(node.nameText)?.html && import_vscode_languageserver7.SymbolKind.Property || import_vscode_languageserver7.SymbolKind.Class,
|
|
1676
1695
|
location: {
|
|
1677
1696
|
uri,
|
|
1678
1697
|
range: parsed.locationAt(node)
|
|
@@ -1714,7 +1733,7 @@ async function formatDocument(doc, formatOptions, cancel) {
|
|
|
1714
1733
|
}).catch(() => null) : null
|
|
1715
1734
|
};
|
|
1716
1735
|
markoPrettier.setCompiler(import_language_tools13.Project.getCompiler(dir), import_language_tools13.Project.getConfig(dir));
|
|
1717
|
-
if (cancel
|
|
1736
|
+
if (cancel?.isCancellationRequested) return;
|
|
1718
1737
|
return [
|
|
1719
1738
|
import_vscode_languageserver8.TextEdit.replace(
|
|
1720
1739
|
{
|
|
@@ -1763,16 +1782,15 @@ var handlers3 = {
|
|
|
1763
1782
|
OpenTagName: OpenTagName3
|
|
1764
1783
|
};
|
|
1765
1784
|
var doHover = async (doc, params) => {
|
|
1766
|
-
var _a;
|
|
1767
1785
|
const file = getMarkoFile(doc);
|
|
1768
1786
|
const offset = doc.offsetAt(params.position);
|
|
1769
1787
|
const node = file.parsed.nodeAt(offset);
|
|
1770
|
-
return await
|
|
1788
|
+
return await handlers3[import_language_tools14.NodeType[node.type]]?.({
|
|
1771
1789
|
file,
|
|
1772
1790
|
params,
|
|
1773
1791
|
offset,
|
|
1774
1792
|
node
|
|
1775
|
-
})
|
|
1793
|
+
});
|
|
1776
1794
|
};
|
|
1777
1795
|
|
|
1778
1796
|
// src/service/marko/validate.ts
|
|
@@ -1910,10 +1928,10 @@ function isError(err) {
|
|
|
1910
1928
|
return err != null && typeof err === "object" && typeof err.message === "string";
|
|
1911
1929
|
}
|
|
1912
1930
|
function isAggregateError(err) {
|
|
1913
|
-
return Array.isArray(err
|
|
1931
|
+
return Array.isArray(err?.errors);
|
|
1914
1932
|
}
|
|
1915
1933
|
function isErrorWithLoc(err) {
|
|
1916
|
-
const loc = err
|
|
1934
|
+
const loc = err?.loc;
|
|
1917
1935
|
if (typeof loc !== "object") return false;
|
|
1918
1936
|
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";
|
|
1919
1937
|
}
|
|
@@ -1954,16 +1972,12 @@ var import_language_tools16 = require("@marko/language-tools");
|
|
|
1954
1972
|
var fsPathReg = /^(?:[./\\]|[A-Z]:)/i;
|
|
1955
1973
|
var modulePartsReg = /^((?:@(?:[^/]+)\/)?(?:[^/]+))(.*)$/;
|
|
1956
1974
|
function patch(ts2, configFile, extractCache3, resolutionCache, host, ps) {
|
|
1957
|
-
var _a, _b, _c;
|
|
1958
1975
|
const processors = import_language_tools16.Processors.create({
|
|
1959
1976
|
ts: ts2,
|
|
1960
1977
|
host,
|
|
1961
1978
|
configFile
|
|
1962
1979
|
});
|
|
1963
|
-
const rootNames = Object.values(processors).map((processor) =>
|
|
1964
|
-
var _a2;
|
|
1965
|
-
return (_a2 = processor.getRootNames) == null ? void 0 : _a2.call(processor);
|
|
1966
|
-
}).flat().filter(Boolean);
|
|
1980
|
+
const rootNames = Object.values(processors).map((processor) => processor.getRootNames?.()).flat().filter(Boolean);
|
|
1967
1981
|
const trackFile = ps ? (fileName) => {
|
|
1968
1982
|
ps.getOrCreateScriptInfoForNormalizedPath(
|
|
1969
1983
|
fileName,
|
|
@@ -1979,7 +1993,7 @@ function patch(ts2, configFile, extractCache3, resolutionCache, host, ps) {
|
|
|
1979
1993
|
host.getScriptFileNames = () => [
|
|
1980
1994
|
...new Set(rootNames.concat(getScriptFileNames()))
|
|
1981
1995
|
];
|
|
1982
|
-
const getScriptKind =
|
|
1996
|
+
const getScriptKind = host.getScriptKind?.bind(host);
|
|
1983
1997
|
if (getScriptKind) {
|
|
1984
1998
|
host.getScriptKind = (fileName) => {
|
|
1985
1999
|
const processor = getProcessor(fileName);
|
|
@@ -2015,19 +2029,19 @@ function patch(ts2, configFile, extractCache3, resolutionCache, host, ps) {
|
|
|
2015
2029
|
return getScriptVersion(fileName);
|
|
2016
2030
|
};
|
|
2017
2031
|
}
|
|
2018
|
-
const readDirectory2 =
|
|
2032
|
+
const readDirectory2 = host.readDirectory?.bind(host);
|
|
2019
2033
|
if (readDirectory2) {
|
|
2020
2034
|
host.readDirectory = (path9, extensions, exclude, include, depth) => {
|
|
2021
2035
|
return readDirectory2(
|
|
2022
2036
|
path9,
|
|
2023
|
-
extensions
|
|
2037
|
+
extensions?.concat(import_language_tools16.Processors.extensions),
|
|
2024
2038
|
exclude,
|
|
2025
2039
|
include,
|
|
2026
2040
|
depth
|
|
2027
2041
|
);
|
|
2028
2042
|
};
|
|
2029
2043
|
}
|
|
2030
|
-
const resolveModuleNameLiterals =
|
|
2044
|
+
const resolveModuleNameLiterals = host.resolveModuleNameLiterals?.bind(host);
|
|
2031
2045
|
if (resolveModuleNameLiterals) {
|
|
2032
2046
|
host.resolveModuleNameLiterals = (moduleLiterals, containingFile, redirectedReference, options, containingSourceFile, reusedNames) => {
|
|
2033
2047
|
let normalModuleLiterals = moduleLiterals;
|
|
@@ -2131,14 +2145,13 @@ var REG_LINE = /\r\n|\n/;
|
|
|
2131
2145
|
var REG_CODE_BLOCK = /^\s*[~`]{3}/m;
|
|
2132
2146
|
var REG_CAPTION = /^<caption>(.*?)<\/caption>\s*(\r\n|\n)/;
|
|
2133
2147
|
function printJSDocTag(tag) {
|
|
2134
|
-
var _a;
|
|
2135
2148
|
switch (tag.name) {
|
|
2136
2149
|
case "augments":
|
|
2137
2150
|
case "extends":
|
|
2138
2151
|
case "param":
|
|
2139
2152
|
case "template": {
|
|
2140
2153
|
const body = getTagBodyParts(tag);
|
|
2141
|
-
if (
|
|
2154
|
+
if (body?.length === 3) {
|
|
2142
2155
|
const [, param, text] = body;
|
|
2143
2156
|
return `${printTagName(tag.name)} \`${param}\`${printTagBody(
|
|
2144
2157
|
replaceLinks(text)
|
|
@@ -2148,7 +2161,7 @@ function printJSDocTag(tag) {
|
|
|
2148
2161
|
}
|
|
2149
2162
|
case "return":
|
|
2150
2163
|
case "returns": {
|
|
2151
|
-
if (!
|
|
2164
|
+
if (!tag.text?.length) return void 0;
|
|
2152
2165
|
break;
|
|
2153
2166
|
}
|
|
2154
2167
|
}
|
|
@@ -2315,7 +2328,7 @@ var ScriptService = {
|
|
|
2315
2328
|
commands: {
|
|
2316
2329
|
"$/showScriptOutput": async (uri) => {
|
|
2317
2330
|
const doc = get(uri);
|
|
2318
|
-
if (
|
|
2331
|
+
if (doc?.languageId !== "marko") return;
|
|
2319
2332
|
const filename = getFSPath(doc);
|
|
2320
2333
|
if (!filename) return;
|
|
2321
2334
|
const tsProject = getTSProject(filename);
|
|
@@ -2352,7 +2365,6 @@ var ScriptService = {
|
|
|
2352
2365
|
});
|
|
2353
2366
|
},
|
|
2354
2367
|
async doComplete(doc, params) {
|
|
2355
|
-
var _a;
|
|
2356
2368
|
const fileName = getFSPath(doc);
|
|
2357
2369
|
if (!fileName) return;
|
|
2358
2370
|
const project = getTSProject(fileName);
|
|
@@ -2366,10 +2378,10 @@ var ScriptService = {
|
|
|
2366
2378
|
{
|
|
2367
2379
|
...await getPreferences(project.markoScriptLang),
|
|
2368
2380
|
...params.context,
|
|
2369
|
-
triggerCharacter: getTSTriggerChar(
|
|
2381
|
+
triggerCharacter: getTSTriggerChar(params.context?.triggerCharacter)
|
|
2370
2382
|
}
|
|
2371
2383
|
);
|
|
2372
|
-
if (!
|
|
2384
|
+
if (!completions?.entries.length) return;
|
|
2373
2385
|
const result = [];
|
|
2374
2386
|
for (const completion of completions.entries) {
|
|
2375
2387
|
let { name: label, insertText, sortText } = completion;
|
|
@@ -2462,7 +2474,7 @@ var ScriptService = {
|
|
|
2462
2474
|
await getPreferences(project.markoScriptLang),
|
|
2463
2475
|
data.originalData
|
|
2464
2476
|
);
|
|
2465
|
-
if (!
|
|
2477
|
+
if (!detail?.codeActions) return;
|
|
2466
2478
|
const extracted = processScript(doc, project);
|
|
2467
2479
|
const textEdits = item.additionalTextEdits = item.additionalTextEdits || [];
|
|
2468
2480
|
for (const action of detail.codeActions) {
|
|
@@ -2509,7 +2521,7 @@ var ScriptService = {
|
|
|
2509
2521
|
fileName,
|
|
2510
2522
|
generatedOffset
|
|
2511
2523
|
);
|
|
2512
|
-
if (!
|
|
2524
|
+
if (!boundary?.definitions) return;
|
|
2513
2525
|
const originSelectionRange = sourceLocationAtTextSpan(
|
|
2514
2526
|
extracted,
|
|
2515
2527
|
boundary.textSpan
|
|
@@ -2670,14 +2682,13 @@ ${documentation}`;
|
|
|
2670
2682
|
};
|
|
2671
2683
|
function processScript(doc, tsProject) {
|
|
2672
2684
|
return processDoc(doc, ({ filename, parsed, lookup }) => {
|
|
2673
|
-
var _a;
|
|
2674
2685
|
const { host, markoScriptLang } = tsProject;
|
|
2675
2686
|
return (0, import_language_tools17.extractScript)({
|
|
2676
2687
|
ts: import_tsserverlibrary.default,
|
|
2677
2688
|
parsed,
|
|
2678
2689
|
lookup,
|
|
2679
2690
|
scriptLang: filename ? import_language_tools17.Project.getScriptLang(filename, markoScriptLang, import_tsserverlibrary.default, host) : markoScriptLang,
|
|
2680
|
-
runtimeTypesCode:
|
|
2691
|
+
runtimeTypesCode: import_language_tools17.Project.getTypeLibs(tsProject.rootDir, import_tsserverlibrary.default, host)?.markoTypesCode
|
|
2681
2692
|
});
|
|
2682
2693
|
});
|
|
2683
2694
|
}
|
|
@@ -2745,12 +2756,11 @@ function getTSConfigFile(fileName) {
|
|
|
2745
2756
|
return configFile;
|
|
2746
2757
|
}
|
|
2747
2758
|
function getTSProject(docFsPath) {
|
|
2748
|
-
var _a;
|
|
2749
2759
|
let configFile;
|
|
2750
2760
|
let markoScriptLang = import_language_tools17.ScriptLang.js;
|
|
2751
2761
|
if (docFsPath) {
|
|
2752
2762
|
configFile = getTSConfigFile(docFsPath);
|
|
2753
|
-
if (configFile
|
|
2763
|
+
if (configFile?.endsWith("tsconfig.json")) {
|
|
2754
2764
|
markoScriptLang = import_language_tools17.ScriptLang.ts;
|
|
2755
2765
|
}
|
|
2756
2766
|
}
|
|
@@ -2778,7 +2788,7 @@ function getTSProject(docFsPath) {
|
|
|
2778
2788
|
const potentialGlobalFiles = new Set(
|
|
2779
2789
|
fileNames.filter((file) => /\.[cm]?ts$/.test(file))
|
|
2780
2790
|
);
|
|
2781
|
-
const tsPkgFile = configFile &&
|
|
2791
|
+
const tsPkgFile = configFile && import_tsserverlibrary.default.resolveModuleName("typescript/package.json", configFile, options, import_tsserverlibrary.default.sys).resolvedModule?.resolvedFileName;
|
|
2782
2792
|
const defaultLibFile = import_path8.default.join(
|
|
2783
2793
|
tsPkgFile ? import_path8.default.join(tsPkgFile, "../lib") : __dirname,
|
|
2784
2794
|
import_tsserverlibrary.default.getDefaultLibFileName(options)
|
|
@@ -2828,10 +2838,7 @@ function getTSProject(docFsPath) {
|
|
|
2828
2838
|
});
|
|
2829
2839
|
},
|
|
2830
2840
|
readDirectory: import_tsserverlibrary.default.sys.readDirectory,
|
|
2831
|
-
readFile: (filename) =>
|
|
2832
|
-
var _a2;
|
|
2833
|
-
return (_a2 = get(filenameToURI(filename))) == null ? void 0 : _a2.getText();
|
|
2834
|
-
},
|
|
2841
|
+
readFile: (filename) => get(filenameToURI(filename))?.getText(),
|
|
2835
2842
|
fileExists: (filename) => exists(filenameToURI(filename)),
|
|
2836
2843
|
getScriptFileNames() {
|
|
2837
2844
|
const result = new Set(potentialGlobalFiles);
|
|
@@ -2847,8 +2854,7 @@ function getTSProject(docFsPath) {
|
|
|
2847
2854
|
return [...result];
|
|
2848
2855
|
},
|
|
2849
2856
|
getScriptVersion(filename) {
|
|
2850
|
-
|
|
2851
|
-
return `${((_a2 = get(filenameToURI(filename))) == null ? void 0 : _a2.version) ?? -1}`;
|
|
2857
|
+
return `${get(filenameToURI(filename))?.version ?? -1}`;
|
|
2852
2858
|
},
|
|
2853
2859
|
getScriptKind(filename) {
|
|
2854
2860
|
switch (import_path8.default.extname(filename)) {
|
|
@@ -2895,7 +2901,6 @@ function filenameToURI(filename) {
|
|
|
2895
2901
|
return import_vscode_uri6.URI.file(filename).toString();
|
|
2896
2902
|
}
|
|
2897
2903
|
async function getPreferences(scriptLang) {
|
|
2898
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
|
2899
2904
|
const configName = scriptLang === import_language_tools17.ScriptLang.js ? "javascript" : "typescript";
|
|
2900
2905
|
const [preferencesConfig, suggestConfig, inlayHintsConfig] = await Promise.all([
|
|
2901
2906
|
getConfig(`${configName}.preferences`),
|
|
@@ -2910,8 +2915,8 @@ async function getPreferences(scriptLang) {
|
|
|
2910
2915
|
includeCompletionsWithSnippetText: suggestConfig.includeCompletionsWithSnippetText ?? true,
|
|
2911
2916
|
includeAutomaticOptionalChainCompletions: suggestConfig.includeAutomaticOptionalChainCompletions ?? true,
|
|
2912
2917
|
includeCompletionsWithInsertText: true,
|
|
2913
|
-
includeCompletionsWithClassMemberSnippets:
|
|
2914
|
-
includeCompletionsWithObjectLiteralMethodSnippets:
|
|
2918
|
+
includeCompletionsWithClassMemberSnippets: suggestConfig.classMemberSnippets?.enabled ?? true,
|
|
2919
|
+
includeCompletionsWithObjectLiteralMethodSnippets: suggestConfig.objectLiteralMethodSnippets?.enabled ?? true,
|
|
2915
2920
|
useLabelDetailsInCompletionEntries: true,
|
|
2916
2921
|
allowIncompleteCompletions: true,
|
|
2917
2922
|
importModuleSpecifierPreference: preferencesConfig.importModuleSpecifierPreference,
|
|
@@ -2921,13 +2926,13 @@ async function getPreferences(scriptLang) {
|
|
|
2921
2926
|
includePackageJsonAutoImports: preferencesConfig.includePackageJsonAutoImports ?? true,
|
|
2922
2927
|
provideRefactorNotApplicableReason: true,
|
|
2923
2928
|
jsxAttributeCompletionStyle: preferencesConfig.jsxAttributeCompletionStyle ?? "auto",
|
|
2924
|
-
includeInlayParameterNameHints:
|
|
2925
|
-
includeInlayParameterNameHintsWhenArgumentMatchesName: !
|
|
2926
|
-
includeInlayFunctionParameterTypeHints:
|
|
2927
|
-
includeInlayVariableTypeHints:
|
|
2928
|
-
includeInlayPropertyDeclarationTypeHints:
|
|
2929
|
-
includeInlayFunctionLikeReturnTypeHints:
|
|
2930
|
-
includeInlayEnumMemberValueHints:
|
|
2929
|
+
includeInlayParameterNameHints: inlayHintsConfig.parameterNames?.enabled ?? "none",
|
|
2930
|
+
includeInlayParameterNameHintsWhenArgumentMatchesName: !inlayHintsConfig.parameterNames?.suppressWhenArgumentMatchesName,
|
|
2931
|
+
includeInlayFunctionParameterTypeHints: inlayHintsConfig.parameterTypes?.enabled ?? true,
|
|
2932
|
+
includeInlayVariableTypeHints: inlayHintsConfig.variableTypes?.enabled ?? true,
|
|
2933
|
+
includeInlayPropertyDeclarationTypeHints: inlayHintsConfig.propertyDeclarationTypes?.enabled ?? true,
|
|
2934
|
+
includeInlayFunctionLikeReturnTypeHints: inlayHintsConfig.functionLikeReturnTypes?.enabled ?? true,
|
|
2935
|
+
includeInlayEnumMemberValueHints: inlayHintsConfig.enumMemberValues?.enabled ?? true
|
|
2931
2936
|
};
|
|
2932
2937
|
}
|
|
2933
2938
|
function printDocumentation(docs2, tags) {
|
|
@@ -3309,7 +3314,6 @@ var StyleSheetService = {
|
|
|
3309
3314
|
}
|
|
3310
3315
|
},
|
|
3311
3316
|
doCodeActions(doc, params) {
|
|
3312
|
-
var _a;
|
|
3313
3317
|
for (const extracted of processStyle(doc)) {
|
|
3314
3318
|
const generatedRange = getGeneratedRange(doc, extracted, params.range);
|
|
3315
3319
|
if (generatedRange === void 0) continue;
|
|
@@ -3320,7 +3324,7 @@ var StyleSheetService = {
|
|
|
3320
3324
|
extracted.parsed
|
|
3321
3325
|
);
|
|
3322
3326
|
for (const command of result) {
|
|
3323
|
-
const edits =
|
|
3327
|
+
const edits = command.arguments?.[2];
|
|
3324
3328
|
if (edits && Array.isArray(edits) && isTextEdit(edits[0])) {
|
|
3325
3329
|
command.arguments[2] = getSourceEdits(extracted, edits);
|
|
3326
3330
|
}
|
|
@@ -3348,13 +3352,12 @@ var StyleSheetService = {
|
|
|
3348
3352
|
};
|
|
3349
3353
|
function processStyle(doc) {
|
|
3350
3354
|
return processDoc(doc, ({ uri, version, parsed, lookup }) => {
|
|
3351
|
-
var _a;
|
|
3352
3355
|
const result = [];
|
|
3353
3356
|
for (const [ext, extracted] of (0, import_language_tools18.extractStyle)({
|
|
3354
3357
|
parsed,
|
|
3355
3358
|
lookup
|
|
3356
3359
|
})) {
|
|
3357
|
-
const service2 =
|
|
3360
|
+
const service2 = services[ext]?.({
|
|
3358
3361
|
fileSystemProvider: file_system_default,
|
|
3359
3362
|
clientCapabilities
|
|
3360
3363
|
});
|
|
@@ -3439,18 +3442,12 @@ var service = {
|
|
|
3439
3442
|
commands: Object.assign({}, ...plugins.map(({ commands }) => commands)),
|
|
3440
3443
|
async initialize(params) {
|
|
3441
3444
|
await Promise.allSettled(
|
|
3442
|
-
plugins.map((plugin) =>
|
|
3443
|
-
var _a;
|
|
3444
|
-
return (_a = plugin.initialize) == null ? void 0 : _a.call(plugin, params);
|
|
3445
|
-
})
|
|
3445
|
+
plugins.map((plugin) => plugin.initialize?.(params))
|
|
3446
3446
|
);
|
|
3447
3447
|
},
|
|
3448
3448
|
async doComplete(doc, params, cancel) {
|
|
3449
3449
|
const results = await Promise.allSettled(
|
|
3450
|
-
plugins.map((plugin) =>
|
|
3451
|
-
var _a;
|
|
3452
|
-
return (_a = plugin.doComplete) == null ? void 0 : _a.call(plugin, doc, params, cancel);
|
|
3453
|
-
})
|
|
3450
|
+
plugins.map((plugin) => plugin.doComplete?.(doc, params, cancel))
|
|
3454
3451
|
);
|
|
3455
3452
|
if (cancel.isCancellationRequested) return;
|
|
3456
3453
|
const itemsByLabel = /* @__PURE__ */ new Map();
|
|
@@ -3471,10 +3468,9 @@ var service = {
|
|
|
3471
3468
|
return { items: [...itemsByLabel.values()], isIncomplete: true };
|
|
3472
3469
|
},
|
|
3473
3470
|
async doCompletionResolve(item, cancel) {
|
|
3474
|
-
var _a;
|
|
3475
3471
|
for (const plugin of plugins) {
|
|
3476
3472
|
try {
|
|
3477
|
-
const result = await
|
|
3473
|
+
const result = await plugin.doCompletionResolve?.(item, cancel);
|
|
3478
3474
|
if (cancel.isCancellationRequested) return;
|
|
3479
3475
|
if (result) return result;
|
|
3480
3476
|
} catch {
|
|
@@ -3483,10 +3479,7 @@ var service = {
|
|
|
3483
3479
|
},
|
|
3484
3480
|
async findDefinition(doc, params, cancel) {
|
|
3485
3481
|
const results = await Promise.allSettled(
|
|
3486
|
-
plugins.map((plugin) =>
|
|
3487
|
-
var _a;
|
|
3488
|
-
return (_a = plugin.findDefinition) == null ? void 0 : _a.call(plugin, doc, params, cancel);
|
|
3489
|
-
})
|
|
3482
|
+
plugins.map((plugin) => plugin.findDefinition?.(doc, params, cancel))
|
|
3490
3483
|
);
|
|
3491
3484
|
if (cancel.isCancellationRequested) return;
|
|
3492
3485
|
let links;
|
|
@@ -3498,10 +3491,7 @@ var service = {
|
|
|
3498
3491
|
},
|
|
3499
3492
|
async findReferences(doc, params, cancel) {
|
|
3500
3493
|
const results = await Promise.allSettled(
|
|
3501
|
-
plugins.map((plugin) =>
|
|
3502
|
-
var _a;
|
|
3503
|
-
return (_a = plugin.findReferences) == null ? void 0 : _a.call(plugin, doc, params, cancel);
|
|
3504
|
-
})
|
|
3494
|
+
plugins.map((plugin) => plugin.findReferences?.(doc, params, cancel))
|
|
3505
3495
|
);
|
|
3506
3496
|
if (cancel.isCancellationRequested) return;
|
|
3507
3497
|
let references;
|
|
@@ -3514,10 +3504,7 @@ var service = {
|
|
|
3514
3504
|
async findDocumentSymbols(doc, params, cancel) {
|
|
3515
3505
|
const results = await Promise.allSettled(
|
|
3516
3506
|
plugins.map(
|
|
3517
|
-
(plugin) =>
|
|
3518
|
-
var _a;
|
|
3519
|
-
return (_a = plugin.findDocumentSymbols) == null ? void 0 : _a.call(plugin, doc, params, cancel);
|
|
3520
|
-
}
|
|
3507
|
+
(plugin) => plugin.findDocumentSymbols?.(doc, params, cancel)
|
|
3521
3508
|
)
|
|
3522
3509
|
);
|
|
3523
3510
|
if (cancel.isCancellationRequested) return;
|
|
@@ -3530,10 +3517,7 @@ var service = {
|
|
|
3530
3517
|
},
|
|
3531
3518
|
async findDocumentLinks(doc, params, cancel) {
|
|
3532
3519
|
const results = await Promise.allSettled(
|
|
3533
|
-
plugins.map((plugin) =>
|
|
3534
|
-
var _a;
|
|
3535
|
-
return (_a = plugin.findDocumentLinks) == null ? void 0 : _a.call(plugin, doc, params, cancel);
|
|
3536
|
-
})
|
|
3520
|
+
plugins.map((plugin) => plugin.findDocumentLinks?.(doc, params, cancel))
|
|
3537
3521
|
);
|
|
3538
3522
|
if (cancel.isCancellationRequested) return;
|
|
3539
3523
|
let links;
|
|
@@ -3546,10 +3530,7 @@ var service = {
|
|
|
3546
3530
|
async findDocumentHighlights(doc, params, cancel) {
|
|
3547
3531
|
const results = await Promise.allSettled(
|
|
3548
3532
|
plugins.map(
|
|
3549
|
-
(plugin) =>
|
|
3550
|
-
var _a;
|
|
3551
|
-
return (_a = plugin.findDocumentHighlights) == null ? void 0 : _a.call(plugin, doc, params, cancel);
|
|
3552
|
-
}
|
|
3533
|
+
(plugin) => plugin.findDocumentHighlights?.(doc, params, cancel)
|
|
3553
3534
|
)
|
|
3554
3535
|
);
|
|
3555
3536
|
if (cancel.isCancellationRequested) return;
|
|
@@ -3562,10 +3543,7 @@ var service = {
|
|
|
3562
3543
|
},
|
|
3563
3544
|
async findDocumentColors(doc, params, cancel) {
|
|
3564
3545
|
const results = await Promise.allSettled(
|
|
3565
|
-
plugins.map((plugin) =>
|
|
3566
|
-
var _a;
|
|
3567
|
-
return (_a = plugin.findDocumentColors) == null ? void 0 : _a.call(plugin, doc, params, cancel);
|
|
3568
|
-
})
|
|
3546
|
+
plugins.map((plugin) => plugin.findDocumentColors?.(doc, params, cancel))
|
|
3569
3547
|
);
|
|
3570
3548
|
if (cancel.isCancellationRequested) return;
|
|
3571
3549
|
let colors;
|
|
@@ -3578,10 +3556,7 @@ var service = {
|
|
|
3578
3556
|
async getColorPresentations(doc, params, cancel) {
|
|
3579
3557
|
const results = await Promise.allSettled(
|
|
3580
3558
|
plugins.map(
|
|
3581
|
-
(plugin) =>
|
|
3582
|
-
var _a;
|
|
3583
|
-
return (_a = plugin.getColorPresentations) == null ? void 0 : _a.call(plugin, doc, params, cancel);
|
|
3584
|
-
}
|
|
3559
|
+
(plugin) => plugin.getColorPresentations?.(doc, params, cancel)
|
|
3585
3560
|
)
|
|
3586
3561
|
);
|
|
3587
3562
|
if (cancel.isCancellationRequested) return;
|
|
@@ -3594,10 +3569,7 @@ var service = {
|
|
|
3594
3569
|
},
|
|
3595
3570
|
async doHover(doc, params, cancel) {
|
|
3596
3571
|
const results = await Promise.allSettled(
|
|
3597
|
-
plugins.map((plugin) =>
|
|
3598
|
-
var _a;
|
|
3599
|
-
return (_a = plugin.doHover) == null ? void 0 : _a.call(plugin, doc, params, cancel);
|
|
3600
|
-
})
|
|
3572
|
+
plugins.map((plugin) => plugin.doHover?.(doc, params, cancel))
|
|
3601
3573
|
);
|
|
3602
3574
|
if (cancel.isCancellationRequested) return;
|
|
3603
3575
|
let hovers;
|
|
@@ -3617,10 +3589,7 @@ var service = {
|
|
|
3617
3589
|
},
|
|
3618
3590
|
async doRename(doc, params, cancel) {
|
|
3619
3591
|
const results = await Promise.allSettled(
|
|
3620
|
-
plugins.map((plugin) =>
|
|
3621
|
-
var _a;
|
|
3622
|
-
return (_a = plugin.doRename) == null ? void 0 : _a.call(plugin, doc, params, cancel);
|
|
3623
|
-
})
|
|
3592
|
+
plugins.map((plugin) => plugin.doRename?.(doc, params, cancel))
|
|
3624
3593
|
);
|
|
3625
3594
|
if (cancel.isCancellationRequested) return;
|
|
3626
3595
|
let changes;
|
|
@@ -3659,10 +3628,7 @@ var service = {
|
|
|
3659
3628
|
},
|
|
3660
3629
|
async doCodeActions(doc, params, cancel) {
|
|
3661
3630
|
const results = await Promise.allSettled(
|
|
3662
|
-
plugins.map((plugin) =>
|
|
3663
|
-
var _a;
|
|
3664
|
-
return (_a = plugin.doCodeActions) == null ? void 0 : _a.call(plugin, doc, params, cancel);
|
|
3665
|
-
})
|
|
3631
|
+
plugins.map((plugin) => plugin.doCodeActions?.(doc, params, cancel))
|
|
3666
3632
|
);
|
|
3667
3633
|
if (cancel.isCancellationRequested) return;
|
|
3668
3634
|
let actions;
|
|
@@ -3674,10 +3640,7 @@ var service = {
|
|
|
3674
3640
|
},
|
|
3675
3641
|
async doValidate(doc) {
|
|
3676
3642
|
const results = await Promise.allSettled(
|
|
3677
|
-
plugins.map((plugin) =>
|
|
3678
|
-
var _a;
|
|
3679
|
-
return (_a = plugin.doValidate) == null ? void 0 : _a.call(plugin, doc);
|
|
3680
|
-
})
|
|
3643
|
+
plugins.map((plugin) => plugin.doValidate?.(doc))
|
|
3681
3644
|
);
|
|
3682
3645
|
let diagnostics;
|
|
3683
3646
|
for (const result of results) {
|