From 4ee6fbca4cf35f74dea74ba6be5ffab8a30778b2 Mon Sep 17 00:00:00 2001
From: Dmytro Storozhuk
Date: Thu, 8 Jan 2026 12:33:03 -0600
Subject: [PATCH 01/16] DP-44225: Add `Self-Reported Accessibility Status`
field with custom widget and storage configuration
Introduced `field_accessibility_status` to the `Document` media entity with a custom `list_long_label` field type and widget for detailed accessibility designations. Updated form and view displays to support the new field and adjusted configurations accordingly.
Signed-off-by: Dmytro Storozhuk
---
changelogs/DP-44225.yml | 3 +
...ty_form_display.media.document.default.yml | 29 +++++---
...ty_view_display.media.document.default.yml | 10 +++
...iew_display.media.document.linked_desc.yml | 2 +
...ty_view_display.media.document.listing.yml | 2 +
...iew_display.media.document.manual_desc.yml | 2 +
...lay.media.document.media_download_link.yml | 2 +
...ia.document.field_accessibility_status.yml | 25 +++++++
...orage.media.field_accessibility_status.yml | 30 +++++++++
.../mass_field_list_long_label.info.yml | 5 ++
.../Field/FieldType/ListLongLabelItem.php | 62 +++++++++++++++++
...tSelfReportedAccessibilityStatusWidget.php | 64 ++++++++++++++++++
.../Field/FieldWidget/ListLongLabelWidget.php | 66 +++++++++++++++++++
13 files changed, 292 insertions(+), 10 deletions(-)
create mode 100644 changelogs/DP-44225.yml
create mode 100644 conf/drupal/config/field.field.media.document.field_accessibility_status.yml
create mode 100644 conf/drupal/config/field.storage.media.field_accessibility_status.yml
create mode 100644 docroot/modules/custom/mass_field_list_long_label/mass_field_list_long_label.info.yml
create mode 100644 docroot/modules/custom/mass_fields/src/Plugin/Field/FieldType/ListLongLabelItem.php
create mode 100644 docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
create mode 100644 docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelWidget.php
diff --git a/changelogs/DP-44225.yml b/changelogs/DP-44225.yml
new file mode 100644
index 0000000000..ce5bdf57ed
--- /dev/null
+++ b/changelogs/DP-44225.yml
@@ -0,0 +1,3 @@
+Added:
+ - description: Field to Document media entity for authors to select accessibility state designation.
+ issue: DP-44225
diff --git a/conf/drupal/config/core.entity_form_display.media.document.default.yml b/conf/drupal/config/core.entity_form_display.media.document.default.yml
index a448b56308..a32fb8eb57 100644
--- a/conf/drupal/config/core.entity_form_display.media.document.default.yml
+++ b/conf/drupal/config/core.entity_form_display.media.document.default.yml
@@ -3,6 +3,7 @@ langcode: en
status: true
dependencies:
config:
+ - field.field.media.document.field_accessibility_status
- field.field.media.document.field_category
- field.field.media.document.field_collections
- field.field.media.document.field_description
@@ -25,6 +26,7 @@ dependencies:
- entity_reference_tree
- field_group
- file
+ - mass_fields
- path
third_party_settings:
field_group:
@@ -34,7 +36,7 @@ third_party_settings:
label: Timeframe
region: hidden
parent_name: ''
- weight: 11
+ weight: 14
format_type: fieldset
format_settings:
classes: ''
@@ -73,6 +75,7 @@ third_party_settings:
- field_description
- field_document_listing_desc
- field_upload_file
+ - field_accessibility_status
- field_category
- field_organizations
- langcode
@@ -97,15 +100,21 @@ targetEntityType: media
bundle: document
mode: default
content:
+ field_accessibility_status:
+ type: list_long_label_document_self_reported_accessibility_status_widget
+ weight: 6
+ region: content
+ settings: { }
+ third_party_settings: { }
field_category:
type: options_select
- weight: 6
+ weight: 7
region: content
settings: { }
third_party_settings: { }
field_collections:
type: entity_reference_tree
- weight: 18
+ weight: 12
region: content
settings:
theme: default
@@ -131,7 +140,7 @@ content:
third_party_settings: { }
field_document_label:
type: entity_reference_autocomplete
- weight: 17
+ weight: 11
region: content
settings:
match_operator: CONTAINS
@@ -149,7 +158,7 @@ content:
third_party_settings: { }
field_internal_notes:
type: string_textarea
- weight: 20
+ weight: 13
region: content
settings:
rows: 1
@@ -157,7 +166,7 @@ content:
third_party_settings: { }
field_media_english_version:
type: entity_reference_autocomplete
- weight: 9
+ weight: 10
region: content
settings:
match_operator: CONTAINS
@@ -185,7 +194,7 @@ content:
selector: ''
field_organizations:
type: entity_reference_autocomplete
- weight: 7
+ weight: 8
region: content
settings:
match_operator: CONTAINS
@@ -210,7 +219,7 @@ content:
third_party_settings: { }
langcode:
type: language_select
- weight: 8
+ weight: 9
region: content
settings:
include_locked: false
@@ -241,14 +250,14 @@ content:
third_party_settings: { }
search:
type: boolean_checkbox
- weight: 6
+ weight: 7
region: content
settings:
display_label: true
third_party_settings: { }
display_label: true
simple_sitemap:
- weight: 5
+ weight: 6
region: content
settings: { }
third_party_settings: { }
diff --git a/conf/drupal/config/core.entity_view_display.media.document.default.yml b/conf/drupal/config/core.entity_view_display.media.document.default.yml
index f0e69e5234..827fe4d495 100644
--- a/conf/drupal/config/core.entity_view_display.media.document.default.yml
+++ b/conf/drupal/config/core.entity_view_display.media.document.default.yml
@@ -3,6 +3,7 @@ langcode: en
status: true
dependencies:
config:
+ - field.field.media.document.field_accessibility_status
- field.field.media.document.field_category
- field.field.media.document.field_collections
- field.field.media.document.field_description
@@ -19,6 +20,8 @@ dependencies:
- field.field.media.document.field_title
- field.field.media.document.field_upload_file
- media.type.document
+ module:
+ - options
id: media.document.default
targetEntityType: media
bundle: document
@@ -63,6 +66,13 @@ content:
third_party_settings: { }
weight: 8
region: content
+ field_accessibility_status:
+ type: list_default
+ label: above
+ settings: { }
+ third_party_settings: { }
+ weight: 103
+ region: content
field_category:
type: entity_reference_label
label: above
diff --git a/conf/drupal/config/core.entity_view_display.media.document.linked_desc.yml b/conf/drupal/config/core.entity_view_display.media.document.linked_desc.yml
index e13ce535f0..9234ac1d5b 100644
--- a/conf/drupal/config/core.entity_view_display.media.document.linked_desc.yml
+++ b/conf/drupal/config/core.entity_view_display.media.document.linked_desc.yml
@@ -4,6 +4,7 @@ status: true
dependencies:
config:
- core.entity_view_mode.media.linked_desc
+ - field.field.media.document.field_accessibility_status
- field.field.media.document.field_category
- field.field.media.document.field_collections
- field.field.media.document.field_description
@@ -81,6 +82,7 @@ content:
hidden:
computed_manual_description: true
created: true
+ field_accessibility_status: true
field_category: true
field_collections: true
field_contributing_agency: true
diff --git a/conf/drupal/config/core.entity_view_display.media.document.listing.yml b/conf/drupal/config/core.entity_view_display.media.document.listing.yml
index f79306b345..1de39c103d 100644
--- a/conf/drupal/config/core.entity_view_display.media.document.listing.yml
+++ b/conf/drupal/config/core.entity_view_display.media.document.listing.yml
@@ -4,6 +4,7 @@ status: true
dependencies:
config:
- core.entity_view_mode.media.listing
+ - field.field.media.document.field_accessibility_status
- field.field.media.document.field_category
- field.field.media.document.field_collections
- field.field.media.document.field_description
@@ -129,6 +130,7 @@ content:
hidden:
computed_manual_description: true
content_moderation_control: true
+ field_accessibility_status: true
field_category: true
field_collections: true
field_description: true
diff --git a/conf/drupal/config/core.entity_view_display.media.document.manual_desc.yml b/conf/drupal/config/core.entity_view_display.media.document.manual_desc.yml
index 9667f3cab6..77235a5e1b 100644
--- a/conf/drupal/config/core.entity_view_display.media.document.manual_desc.yml
+++ b/conf/drupal/config/core.entity_view_display.media.document.manual_desc.yml
@@ -4,6 +4,7 @@ status: true
dependencies:
config:
- core.entity_view_mode.media.manual_desc
+ - field.field.media.document.field_accessibility_status
- field.field.media.document.field_category
- field.field.media.document.field_collections
- field.field.media.document.field_description
@@ -73,6 +74,7 @@ content:
hidden:
computed_manual_description: true
created: true
+ field_accessibility_status: true
field_category: true
field_collections: true
field_contributing_agency: true
diff --git a/conf/drupal/config/core.entity_view_display.media.document.media_download_link.yml b/conf/drupal/config/core.entity_view_display.media.document.media_download_link.yml
index a3399afcba..921f8bbab4 100644
--- a/conf/drupal/config/core.entity_view_display.media.document.media_download_link.yml
+++ b/conf/drupal/config/core.entity_view_display.media.document.media_download_link.yml
@@ -4,6 +4,7 @@ status: true
dependencies:
config:
- core.entity_view_mode.media.media_download_link
+ - field.field.media.document.field_accessibility_status
- field.field.media.document.field_category
- field.field.media.document.field_collections
- field.field.media.document.field_description
@@ -68,6 +69,7 @@ content:
hidden:
content_moderation_control: true
created: true
+ field_accessibility_status: true
field_category: true
field_collections: true
field_description: true
diff --git a/conf/drupal/config/field.field.media.document.field_accessibility_status.yml b/conf/drupal/config/field.field.media.document.field_accessibility_status.yml
new file mode 100644
index 0000000000..ef875201c9
--- /dev/null
+++ b/conf/drupal/config/field.field.media.document.field_accessibility_status.yml
@@ -0,0 +1,25 @@
+uuid: eeb03c2f-6a77-4dae-a032-cef9a1a36c68
+langcode: en
+status: true
+dependencies:
+ config:
+ - field.storage.media.field_accessibility_status
+ - media.type.document
+ module:
+ - mass_fields
+ - require_on_publish
+third_party_settings:
+ require_on_publish:
+ require_on_publish: true
+id: media.document.field_accessibility_status
+field_name: field_accessibility_status
+entity_type: media
+bundle: document
+label: 'Self-Reported Accessibility Status'
+description: 'Help text: All Mass.gov documents are required to meet digital accessibility standards. Select an accessibility designation for this document. If you''re unsure how to create, test, or remediate an accessible document, live training and self-paced training resources are available in the accessibility training resource center.'
+required: false
+translatable: false
+default_value: { }
+default_value_callback: ''
+settings: { }
+field_type: list_long_label
diff --git a/conf/drupal/config/field.storage.media.field_accessibility_status.yml b/conf/drupal/config/field.storage.media.field_accessibility_status.yml
new file mode 100644
index 0000000000..5ca9a2d1ed
--- /dev/null
+++ b/conf/drupal/config/field.storage.media.field_accessibility_status.yml
@@ -0,0 +1,30 @@
+uuid: 7fbaa67a-8e9d-4018-ae19-fe513bf87c82
+langcode: en
+status: true
+dependencies:
+ module:
+ - mass_fields
+ - media
+id: media.field_accessibility_status
+field_name: field_accessibility_status
+entity_type: media
+type: list_long_label
+settings:
+ allowed_values:
+ -
+ value: verified_accessible
+ label: 'Verified accessible: I verify this document has been tested for accessibility using the appropriate Accessibility Testing Checklist and any built-in automated accessibility checkers. Any identified accessibility errors were fixed before upload'
+ -
+ value: not_tested
+ label: 'Not tested: I verify this document has not been tested for accessibility using the appropriate Accessibility Testing Checklist. I understand that there may be legal liability associated with publishing an inaccessible document. I understand that my agency must provide this document in an accessible format upon request.'
+ -
+ value: exception
+ label: 'Exception: I verify this document is part of a collection of documents that have been approved for an exception to the Enterprise Digital Accessibility Policy through the formal Exception Request Process. I understand that my agency must provide this document in an accessible format upon request.'
+ allowed_values_function: ''
+module: mass_fields
+locked: false
+cardinality: 1
+translatable: true
+indexes: { }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/docroot/modules/custom/mass_field_list_long_label/mass_field_list_long_label.info.yml b/docroot/modules/custom/mass_field_list_long_label/mass_field_list_long_label.info.yml
new file mode 100644
index 0000000000..e2f5a7aa97
--- /dev/null
+++ b/docroot/modules/custom/mass_field_list_long_label/mass_field_list_long_label.info.yml
@@ -0,0 +1,5 @@
+name: 'Mass Field List Long Label'
+type: module
+description: 'Provides a list field type with support for long option labels and descriptions.'
+core_version_requirement: ^10 || ^11
+package: 'Mass.gov'
diff --git a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldType/ListLongLabelItem.php b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldType/ListLongLabelItem.php
new file mode 100644
index 0000000000..e471933e7d
--- /dev/null
+++ b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldType/ListLongLabelItem.php
@@ -0,0 +1,62 @@
+' . $this->t('The label can contain formatted text and HTML.');
+ $description .= '
' . $this->t('The key is automatically generated as a machine name from the label and will be the stored value.');
+ $description .= '
';
+ return $description;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ public function storageSettingsForm(array &$form, FormStateInterface $form_state, $has_data) {
+ // Get the parent form with machine name functionality.
+ $element = parent::storageSettingsForm($form, $form_state, $has_data);
+
+ // Only change: replace textfield with textarea for long HTML labels.
+ foreach (Element::children($element['allowed_values']['table']) as $delta => $row) {
+ if (isset($element['allowed_values']['table'][$delta]['item']['label'])) {
+ $element['allowed_values']['table'][$delta]['item']['label']['#type'] = 'textarea';
+ $element['allowed_values']['table'][$delta]['item']['label']['#rows'] = 5;
+ $element['allowed_values']['table'][$delta]['item']['label']['#title'] = $this->t('Label (HTML allowed)');
+ $element['allowed_values']['table'][$delta]['item']['label']['#description'] = $this->t('Enter the option label. HTML tags allowed: <strong>, <em>, <p>, <br>, <a>, <ul>, <ol>, <li>.');
+ }
+ }
+
+ return $element;
+ }
+
+}
diff --git a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
new file mode 100644
index 0000000000..8d08e16f18
--- /dev/null
+++ b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
@@ -0,0 +1,64 @@
+getOptions($items->getEntity());
+ $selected = $this->getSelectedOptions($items);
+
+ // If required and there is one single option, preselect it.
+ if ($this->required && count($options) == 1) {
+ $selected = [array_key_first($options)];
+ }
+
+ // Move "_none" item to the bottom.
+ $none = array_shift($options);
+ $options['_none'] = $none;
+
+ $element['#type'] = 'radios';
+ $element['#options'] = $options;
+ $element['#default_value'] = $selected ? reset($selected) : '_none';
+
+ return $element;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function getEmptyLabel() {
+ if (!$this->required && !$this->multiple) {
+ return new FormattableMarkup('TBD: You can\'t publish this document unless you choose one of the other states.', []);
+ }
+ }
+
+}
diff --git a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelWidget.php b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelWidget.php
new file mode 100644
index 0000000000..104b83bce2
--- /dev/null
+++ b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelWidget.php
@@ -0,0 +1,66 @@
+ $label) {
+ // Filter HTML to only allow specific tags, then mark as safe.
+ $filtered_label = Xss::filter($label, $allowed_tags);
+ $processed[$key] = new FormattableMarkup($filtered_label, []);
+ }
+
+ return $processed;
+ }
+
+ /**
+ * {@inheritdoc}
+ */
+ protected function getEmptyLabel() {
+ if (!$this->required && !$this->multiple) {
+ return $this->t('N/A');
+ }
+
+ return NULL;
+ }
+
+}
From c7b34b6b696379d4f111ed62bf1800af7d6c0cf0 Mon Sep 17 00:00:00 2001
From: Dmytro Storozhuk
Date: Thu, 8 Jan 2026 19:45:21 -0600
Subject: [PATCH 02/16] DP-44225: Attach library to reset accessibility status
on document removal
Added JavaScript behavior to reset the `Self-Reported Accessibility Status` field to `_none` when a file is removed. Updated widget implementation and libraries configuration accordingly.
Signed-off-by: Dmytro Storozhuk
---
.../js/accessibility-status-reset.js | 40 +++++++++++++++++++
.../mass_fields/mass_fields.libraries.yml | 8 ++++
...tSelfReportedAccessibilityStatusWidget.php | 3 ++
3 files changed, 51 insertions(+)
create mode 100644 docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
diff --git a/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js b/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
new file mode 100644
index 0000000000..ee44d638f2
--- /dev/null
+++ b/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
@@ -0,0 +1,40 @@
+/**
+ * @file
+ * Reset the accessibility status field when a document is removed.
+ */
+
+(function ($, Drupal, once) {
+ 'use strict';
+
+ /**
+ * Resets the accessibility status radio buttons when file is removed.
+ */
+ Drupal.behaviors.accessibilityStatusReset = {
+ attach: function (context, settings) {
+ // Listen for AJAX commands to detect when a file is removed.
+ $(document).on('ajaxSuccess', function (event, xhr, ajaxSettings) {
+ // Small delay to let DOM update after AJAX.
+ setTimeout(function () {
+ // Check if the fids field is empty (file was removed).
+ const $fidsField = $('input[data-drupal-selector="edit-field-upload-file-0-fids"]');
+
+ if ($fidsField.length && !$fidsField.val()) {
+ // File was removed, reset accessibility status to _none.
+ const $form = $fidsField.closest('form');
+ const $accessibilityRadios = $form.find('input[name="field_accessibility_status"]');
+
+ // Uncheck all radios.
+ $accessibilityRadios.prop('checked', false);
+
+ // Check the _none radio button.
+ const $noneRadio = $form.find('input[name="field_accessibility_status"][value="_none"]');
+ if ($noneRadio.length) {
+ $noneRadio.prop('checked', true).trigger('change');
+ }
+ }
+ }, 100);
+ });
+ }
+ };
+
+})(jQuery, Drupal, once);
diff --git a/docroot/modules/custom/mass_fields/mass_fields.libraries.yml b/docroot/modules/custom/mass_fields/mass_fields.libraries.yml
index 3cd0c29a38..ca44b3f089 100644
--- a/docroot/modules/custom/mass_fields/mass_fields.libraries.yml
+++ b/docroot/modules/custom/mass_fields/mass_fields.libraries.yml
@@ -2,3 +2,11 @@ reference.field:
css:
theme:
css/reference-field.css: {}
+
+accessibility_status_reset:
+ js:
+ js/accessibility-status-reset.js: {}
+ dependencies:
+ - core/jquery
+ - core/drupal
+ - core/once
diff --git a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
index 8d08e16f18..f43110dbdd 100644
--- a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
+++ b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
@@ -49,6 +49,9 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
$element['#options'] = $options;
$element['#default_value'] = $selected ? reset($selected) : '_none';
+ // Attach JavaScript library to reset accessibility status when file is removed.
+ $element['#attached']['library'][] = 'mass_fields/accessibility_status_reset';
+
return $element;
}
From 7d80cc3364fd1be19ca6fb606cd0def576c5b4cb Mon Sep 17 00:00:00 2001
From: Dmytro Storozhuk
Date: Thu, 15 Jan 2026 11:10:02 -0600
Subject: [PATCH 03/16] DP-44225: Rename `field_accessibility_status` to
`field_accessibility_self_rpt` and update related configurations
Replaced `field_accessibility_status` with `field_accessibility_self_rpt` across media entity configurations, forms, view displays, and field types. Adjusted allowed HTML tags and improved widget labels for accessibility status designation.
Signed-off-by: Dmytro Storozhuk
---
...ty_form_display.media.document.default.yml | 6 ++--
...ty_view_display.media.document.default.yml | 12 ++------
...iew_display.media.document.linked_desc.yml | 4 +--
...ty_view_display.media.document.listing.yml | 4 +--
...iew_display.media.document.manual_desc.yml | 4 +--
...lay.media.document.media_download_link.yml | 4 +--
...document.field_accessibility_self_rpt.yml} | 8 ++---
...age.media.field_accessibility_self_rpt.yml | 30 +++++++++++++++++++
...orage.media.field_accessibility_status.yml | 30 -------------------
.../Field/FieldType/ListLongLabelItem.php | 2 +-
...tSelfReportedAccessibilityStatusWidget.php | 2 +-
.../Field/FieldWidget/ListLongLabelWidget.php | 2 +-
12 files changed, 50 insertions(+), 58 deletions(-)
rename conf/drupal/config/{field.field.media.document.field_accessibility_status.yml => field.field.media.document.field_accessibility_self_rpt.yml} (83%)
create mode 100644 conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml
delete mode 100644 conf/drupal/config/field.storage.media.field_accessibility_status.yml
diff --git a/conf/drupal/config/core.entity_form_display.media.document.default.yml b/conf/drupal/config/core.entity_form_display.media.document.default.yml
index a32fb8eb57..7e0bfffa47 100644
--- a/conf/drupal/config/core.entity_form_display.media.document.default.yml
+++ b/conf/drupal/config/core.entity_form_display.media.document.default.yml
@@ -3,7 +3,7 @@ langcode: en
status: true
dependencies:
config:
- - field.field.media.document.field_accessibility_status
+ - field.field.media.document.field_accessibility_self_rpt
- field.field.media.document.field_category
- field.field.media.document.field_collections
- field.field.media.document.field_description
@@ -75,7 +75,7 @@ third_party_settings:
- field_description
- field_document_listing_desc
- field_upload_file
- - field_accessibility_status
+ - field_accessibility_self_rpt
- field_category
- field_organizations
- langcode
@@ -100,7 +100,7 @@ targetEntityType: media
bundle: document
mode: default
content:
- field_accessibility_status:
+ field_accessibility_self_rpt:
type: list_long_label_document_self_reported_accessibility_status_widget
weight: 6
region: content
diff --git a/conf/drupal/config/core.entity_view_display.media.document.default.yml b/conf/drupal/config/core.entity_view_display.media.document.default.yml
index 827fe4d495..b909d40b80 100644
--- a/conf/drupal/config/core.entity_view_display.media.document.default.yml
+++ b/conf/drupal/config/core.entity_view_display.media.document.default.yml
@@ -3,7 +3,7 @@ langcode: en
status: true
dependencies:
config:
- - field.field.media.document.field_accessibility_status
+ - field.field.media.document.field_accessibility_self_rpt
- field.field.media.document.field_category
- field.field.media.document.field_collections
- field.field.media.document.field_description
@@ -20,8 +20,6 @@ dependencies:
- field.field.media.document.field_title
- field.field.media.document.field_upload_file
- media.type.document
- module:
- - options
id: media.document.default
targetEntityType: media
bundle: document
@@ -66,13 +64,6 @@ content:
third_party_settings: { }
weight: 8
region: content
- field_accessibility_status:
- type: list_default
- label: above
- settings: { }
- third_party_settings: { }
- weight: 103
- region: content
field_category:
type: entity_reference_label
label: above
@@ -148,6 +139,7 @@ content:
region: content
hidden:
computed_manual_description: true
+ field_accessibility_self_rpt: true
field_description: true
field_document_label: true
field_document_type: true
diff --git a/conf/drupal/config/core.entity_view_display.media.document.linked_desc.yml b/conf/drupal/config/core.entity_view_display.media.document.linked_desc.yml
index 9234ac1d5b..c3497800cb 100644
--- a/conf/drupal/config/core.entity_view_display.media.document.linked_desc.yml
+++ b/conf/drupal/config/core.entity_view_display.media.document.linked_desc.yml
@@ -4,7 +4,7 @@ status: true
dependencies:
config:
- core.entity_view_mode.media.linked_desc
- - field.field.media.document.field_accessibility_status
+ - field.field.media.document.field_accessibility_self_rpt
- field.field.media.document.field_category
- field.field.media.document.field_collections
- field.field.media.document.field_description
@@ -82,7 +82,7 @@ content:
hidden:
computed_manual_description: true
created: true
- field_accessibility_status: true
+ field_accessibility_self_rpt: true
field_category: true
field_collections: true
field_contributing_agency: true
diff --git a/conf/drupal/config/core.entity_view_display.media.document.listing.yml b/conf/drupal/config/core.entity_view_display.media.document.listing.yml
index 1de39c103d..fddee9ffbf 100644
--- a/conf/drupal/config/core.entity_view_display.media.document.listing.yml
+++ b/conf/drupal/config/core.entity_view_display.media.document.listing.yml
@@ -4,7 +4,7 @@ status: true
dependencies:
config:
- core.entity_view_mode.media.listing
- - field.field.media.document.field_accessibility_status
+ - field.field.media.document.field_accessibility_self_rpt
- field.field.media.document.field_category
- field.field.media.document.field_collections
- field.field.media.document.field_description
@@ -130,7 +130,7 @@ content:
hidden:
computed_manual_description: true
content_moderation_control: true
- field_accessibility_status: true
+ field_accessibility_self_rpt: true
field_category: true
field_collections: true
field_description: true
diff --git a/conf/drupal/config/core.entity_view_display.media.document.manual_desc.yml b/conf/drupal/config/core.entity_view_display.media.document.manual_desc.yml
index 77235a5e1b..500406669e 100644
--- a/conf/drupal/config/core.entity_view_display.media.document.manual_desc.yml
+++ b/conf/drupal/config/core.entity_view_display.media.document.manual_desc.yml
@@ -4,7 +4,7 @@ status: true
dependencies:
config:
- core.entity_view_mode.media.manual_desc
- - field.field.media.document.field_accessibility_status
+ - field.field.media.document.field_accessibility_self_rpt
- field.field.media.document.field_category
- field.field.media.document.field_collections
- field.field.media.document.field_description
@@ -74,7 +74,7 @@ content:
hidden:
computed_manual_description: true
created: true
- field_accessibility_status: true
+ field_accessibility_self_rpt: true
field_category: true
field_collections: true
field_contributing_agency: true
diff --git a/conf/drupal/config/core.entity_view_display.media.document.media_download_link.yml b/conf/drupal/config/core.entity_view_display.media.document.media_download_link.yml
index 921f8bbab4..c7d5cbebb9 100644
--- a/conf/drupal/config/core.entity_view_display.media.document.media_download_link.yml
+++ b/conf/drupal/config/core.entity_view_display.media.document.media_download_link.yml
@@ -4,7 +4,7 @@ status: true
dependencies:
config:
- core.entity_view_mode.media.media_download_link
- - field.field.media.document.field_accessibility_status
+ - field.field.media.document.field_accessibility_self_rpt
- field.field.media.document.field_category
- field.field.media.document.field_collections
- field.field.media.document.field_description
@@ -69,7 +69,7 @@ content:
hidden:
content_moderation_control: true
created: true
- field_accessibility_status: true
+ field_accessibility_self_rpt: true
field_category: true
field_collections: true
field_description: true
diff --git a/conf/drupal/config/field.field.media.document.field_accessibility_status.yml b/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
similarity index 83%
rename from conf/drupal/config/field.field.media.document.field_accessibility_status.yml
rename to conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
index ef875201c9..376c79be99 100644
--- a/conf/drupal/config/field.field.media.document.field_accessibility_status.yml
+++ b/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
@@ -1,9 +1,9 @@
-uuid: eeb03c2f-6a77-4dae-a032-cef9a1a36c68
+uuid: eeb03c2f-6a77-4dae-a032-cw29s4a36c68
langcode: en
status: true
dependencies:
config:
- - field.storage.media.field_accessibility_status
+ - field.storage.media.field_accessibility_self_rpt
- media.type.document
module:
- mass_fields
@@ -11,8 +11,8 @@ dependencies:
third_party_settings:
require_on_publish:
require_on_publish: true
-id: media.document.field_accessibility_status
-field_name: field_accessibility_status
+id: media.document.field_accessibility_self_rpt
+field_name: field_accessibility_self_rpt
entity_type: media
bundle: document
label: 'Self-Reported Accessibility Status'
diff --git a/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml b/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml
new file mode 100644
index 0000000000..2c7073c0da
--- /dev/null
+++ b/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml
@@ -0,0 +1,30 @@
+uuid: 7fbaa67a-839d-4018-ae19-fe613bf87c82
+langcode: en
+status: true
+dependencies:
+ module:
+ - mass_fields
+ - media
+id: media.field_accessibility_self_rpt
+field_name: field_accessibility_self_rpt
+entity_type: media
+type: list_long_label
+settings:
+ allowed_values:
+ -
+ value: verified_accessible
+ label: 'Verified accessible:
I verify this document has been tested for accessibility using the appropriate Accessibility Testing Checklist and any built-in automated accessibility checkers. Any identified accessibility errors were fixed before upload.'
+ -
+ value: not_tested
+ label: 'Not tested:
I verify this document has not been tested for accessibility using the appropriate Accessibility Testing Checklist. I understand that there may be legal liability associated with publishing an inaccessible document. I understand that my agency must provide this document in an accessible format upon request.'
+ -
+ value: exception
+ label: 'Exception:
I verify this document is part of a collection of documents that have been approved for an exception to the Enterprise Digital Accessibility Policy through the formal Exception Request Process. I understand that my agency must provide this document in an accessible format upon request.'
+ allowed_values_function: ''
+module: mass_fields
+locked: false
+cardinality: 1
+translatable: true
+indexes: { }
+persist_with_no_fields: false
+custom_storage: false
diff --git a/conf/drupal/config/field.storage.media.field_accessibility_status.yml b/conf/drupal/config/field.storage.media.field_accessibility_status.yml
deleted file mode 100644
index 5ca9a2d1ed..0000000000
--- a/conf/drupal/config/field.storage.media.field_accessibility_status.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-uuid: 7fbaa67a-8e9d-4018-ae19-fe513bf87c82
-langcode: en
-status: true
-dependencies:
- module:
- - mass_fields
- - media
-id: media.field_accessibility_status
-field_name: field_accessibility_status
-entity_type: media
-type: list_long_label
-settings:
- allowed_values:
- -
- value: verified_accessible
- label: 'Verified accessible: I verify this document has been tested for accessibility using the appropriate Accessibility Testing Checklist and any built-in automated accessibility checkers. Any identified accessibility errors were fixed before upload'
- -
- value: not_tested
- label: 'Not tested: I verify this document has not been tested for accessibility using the appropriate Accessibility Testing Checklist. I understand that there may be legal liability associated with publishing an inaccessible document. I understand that my agency must provide this document in an accessible format upon request.'
- -
- value: exception
- label: 'Exception: I verify this document is part of a collection of documents that have been approved for an exception to the Enterprise Digital Accessibility Policy through the formal Exception Request Process. I understand that my agency must provide this document in an accessible format upon request.'
- allowed_values_function: ''
-module: mass_fields
-locked: false
-cardinality: 1
-translatable: true
-indexes: { }
-persist_with_no_fields: false
-custom_storage: false
diff --git a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldType/ListLongLabelItem.php b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldType/ListLongLabelItem.php
index e471933e7d..bce08e6a59 100644
--- a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldType/ListLongLabelItem.php
+++ b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldType/ListLongLabelItem.php
@@ -52,7 +52,7 @@ public function storageSettingsForm(array &$form, FormStateInterface $form_state
$element['allowed_values']['table'][$delta]['item']['label']['#type'] = 'textarea';
$element['allowed_values']['table'][$delta]['item']['label']['#rows'] = 5;
$element['allowed_values']['table'][$delta]['item']['label']['#title'] = $this->t('Label (HTML allowed)');
- $element['allowed_values']['table'][$delta]['item']['label']['#description'] = $this->t('Enter the option label. HTML tags allowed: <strong>, <em>, <p>, <br>, <a>, <ul>, <ol>, <li>.');
+ $element['allowed_values']['table'][$delta]['item']['label']['#description'] = $this->t('Enter the option label. HTML tags allowed: <strong>, <em>, <p>, <br>, <a>, <ul>, <ol>, <li>, <span>, <small>.');
}
}
diff --git a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
index f43110dbdd..b00b76fef3 100644
--- a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
+++ b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
@@ -60,7 +60,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
*/
protected function getEmptyLabel() {
if (!$this->required && !$this->multiple) {
- return new FormattableMarkup('TBD: You can\'t publish this document unless you choose one of the other states.', []);
+ return new FormattableMarkup('TBD:
You can\'t publish this document unless you choose one of the other states.', []);
}
}
diff --git a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelWidget.php b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelWidget.php
index 104b83bce2..16f56b9b34 100644
--- a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelWidget.php
+++ b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelWidget.php
@@ -41,7 +41,7 @@ protected function prepareOptions(array $options) {
$processed = [];
// Define allowed HTML tags for labels.
- $allowed_tags = ['strong', 'em', 'p', 'br', 'a', 'ul', 'ol', 'li', 'span', 'div'];
+ $allowed_tags = ['strong', 'em', 'p', 'br', 'a', 'ul', 'ol', 'li', 'span', 'small'];
foreach ($options as $key => $label) {
// Filter HTML to only allow specific tags, then mark as safe.
From 30c1c88a16af6eca1ef7cef43ba8f1b32772f476 Mon Sep 17 00:00:00 2001
From: Dmytro Storozhuk
Date: Thu, 15 Jan 2026 11:16:52 -0600
Subject: [PATCH 04/16] DP-44225: Remove `mass_field_list_long_label` module no
longer in use
Signed-off-by: Dmytro Storozhuk
---
.../mass_field_list_long_label.info.yml | 5 -----
1 file changed, 5 deletions(-)
delete mode 100644 docroot/modules/custom/mass_field_list_long_label/mass_field_list_long_label.info.yml
diff --git a/docroot/modules/custom/mass_field_list_long_label/mass_field_list_long_label.info.yml b/docroot/modules/custom/mass_field_list_long_label/mass_field_list_long_label.info.yml
deleted file mode 100644
index e2f5a7aa97..0000000000
--- a/docroot/modules/custom/mass_field_list_long_label/mass_field_list_long_label.info.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-name: 'Mass Field List Long Label'
-type: module
-description: 'Provides a list field type with support for long option labels and descriptions.'
-core_version_requirement: ^10 || ^11
-package: 'Mass.gov'
From cffbc0c2bb49c85c2e325eb0db868506b87761db Mon Sep 17 00:00:00 2001
From: Dmytro Storozhuk
Date: Thu, 15 Jan 2026 11:22:43 -0600
Subject: [PATCH 05/16] DP-44225: Update JavaScript to reflect
`field_accessibility_status` renaming
Revised JavaScript to replace `field_accessibility_status` with `field_accessibility_self_rpt` for consistency with renamed field.
Signed-off-by: Dmytro Storozhuk
---
.../custom/mass_fields/js/accessibility-status-reset.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js b/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
index ee44d638f2..7a3b6e8510 100644
--- a/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
+++ b/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
@@ -21,13 +21,13 @@
if ($fidsField.length && !$fidsField.val()) {
// File was removed, reset accessibility status to _none.
const $form = $fidsField.closest('form');
- const $accessibilityRadios = $form.find('input[name="field_accessibility_status"]');
+ const $accessibilityRadios = $form.find('input[name="field_accessibility_self_rpt"]');
// Uncheck all radios.
$accessibilityRadios.prop('checked', false);
// Check the _none radio button.
- const $noneRadio = $form.find('input[name="field_accessibility_status"][value="_none"]');
+ const $noneRadio = $form.find('input[name="field_accessibility_self_rpt"][value="_none"]');
if ($noneRadio.length) {
$noneRadio.prop('checked', true).trigger('change');
}
From 5c1fcb942b8c876cb46c337eb5e2de46940fbc51 Mon Sep 17 00:00:00 2001
From: Joe Galluccio
Date: Tue, 20 Jan 2026 17:22:47 -0500
Subject: [PATCH 06/16] updated text
---
...ield.field.media.document.field_accessibility_self_rpt.yml | 4 ++--
...LongLabelDocumentSelfReportedAccessibilityStatusWidget.php | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml b/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
index 376c79be99..02b438de77 100644
--- a/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
+++ b/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
@@ -15,8 +15,8 @@ id: media.document.field_accessibility_self_rpt
field_name: field_accessibility_self_rpt
entity_type: media
bundle: document
-label: 'Self-Reported Accessibility Status'
-description: 'Help text: All Mass.gov documents are required to meet digital accessibility standards. Select an accessibility designation for this document. If you''re unsure how to create, test, or remediate an accessible document, live training and self-paced training resources are available in the accessibility training resource center.'
+label: 'Accessibility Status (self-reported)'
+description: 'All Mass.gov documents are required to meet digital accessibility standards. Report if this document is accessible. If you’re unsure how to create, test, or remediate a document to make it accessible, live training and self-paced training resources are available in the accessibility training resource center. Questions? Reach out to the ACCESS team.'
required: false
translatable: false
default_value: { }
diff --git a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
index b00b76fef3..c01c1b8bcb 100644
--- a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
+++ b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
@@ -60,7 +60,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
*/
protected function getEmptyLabel() {
if (!$this->required && !$this->multiple) {
- return new FormattableMarkup('TBD:
You can\'t publish this document unless you choose one of the other states.', []);
+ return new FormattableMarkup('TBD:
You can\'t publish this document unless you choose one of the other states.', []);
}
}
From 194528ab7494b35d43797e5ff681c26a2578f0b7 Mon Sep 17 00:00:00 2001
From: Joe Galluccio
Date: Fri, 23 Jan 2026 17:27:04 -0500
Subject: [PATCH 07/16] updated text
---
...ld.field.media.document.field_accessibility_self_rpt.yml | 2 +-
.../field.storage.media.field_accessibility_self_rpt.yml | 6 +++---
...ngLabelDocumentSelfReportedAccessibilityStatusWidget.php | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml b/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
index 02b438de77..8b81a25bb8 100644
--- a/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
+++ b/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
@@ -16,7 +16,7 @@ field_name: field_accessibility_self_rpt
entity_type: media
bundle: document
label: 'Accessibility Status (self-reported)'
-description: 'All Mass.gov documents are required to meet digital accessibility standards. Report if this document is accessible. If you’re unsure how to create, test, or remediate a document to make it accessible, live training and self-paced training resources are available in the accessibility training resource center. Questions? Reach out to the ACCESS team.'
+description: 'All Mass.gov documents are required to meet digital accessibility standards. Report if this document is accessible. If you’re unsure how to create, test, or remediate a document to make it accessible, visit the accessibility training resource center. Questions? Sign-up for ACCESS Office Hours.'
required: false
translatable: false
default_value: { }
diff --git a/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml b/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml
index 2c7073c0da..f46070de3b 100644
--- a/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml
+++ b/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml
@@ -13,13 +13,13 @@ settings:
allowed_values:
-
value: verified_accessible
- label: 'Verified accessible:
I verify this document has been tested for accessibility using the appropriate Accessibility Testing Checklist and any built-in automated accessibility checkers. Any identified accessibility errors were fixed before upload.'
+ label: 'Verified accessible:
My organization or a third-party vendor has checked the document and it passes automated and manual accessibility checks.'
-
value: not_tested
- label: 'Not tested:
I verify this document has not been tested for accessibility using the appropriate Accessibility Testing Checklist. I understand that there may be legal liability associated with publishing an inaccessible document. I understand that my agency must provide this document in an accessible format upon request.'
+ label: 'Unverified or not accessible yet:
The document is not accessible or hasn’t been checked for accessibility yet. I understand that my organization needs to replace this document with an accessible version as soon as possible.'
-
value: exception
- label: 'Exception:
I verify this document is part of a collection of documents that have been approved for an exception to the Enterprise Digital Accessibility Policy through the formal Exception Request Process. I understand that my agency must provide this document in an accessible format upon request.'
+ label: 'Exception:
I went through the Exception Request Process and this document has been approved as an exception. I understand that my organization must provide this document in an accessible format upon request.'
allowed_values_function: ''
module: mass_fields
locked: false
diff --git a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
index c01c1b8bcb..669e3e6c2d 100644
--- a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
+++ b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
@@ -60,7 +60,7 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
*/
protected function getEmptyLabel() {
if (!$this->required && !$this->multiple) {
- return new FormattableMarkup('TBD:
You can\'t publish this document unless you choose one of the other states.', []);
+ return new FormattableMarkup('TBD:
You can\'t publish this document unless you choose one of the other states.', []);
}
}
From 2b7484372cee78676184365319971a9c049449ae Mon Sep 17 00:00:00 2001
From: Joe Galluccio
Date: Fri, 6 Feb 2026 09:51:12 -0500
Subject: [PATCH 08/16] minor text change
---
.../config/field.storage.media.field_accessibility_self_rpt.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml b/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml
index f46070de3b..3a4206a95e 100644
--- a/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml
+++ b/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml
@@ -16,7 +16,7 @@ settings:
label: 'Verified accessible:
My organization or a third-party vendor has checked the document and it passes automated and manual accessibility checks.'
-
value: not_tested
- label: 'Unverified or not accessible yet:
The document is not accessible or hasn’t been checked for accessibility yet. I understand that my organization needs to replace this document with an accessible version as soon as possible.'
+ label: 'Unverified or not accessible yet:
The document is not accessible or hasn’t been checked for accessibility yet. I understand that my organization needs to replace this document with an accessible version as soon as possible.'
-
value: exception
label: 'Exception:
I went through the Exception Request Process and this document has been approved as an exception. I understand that my organization must provide this document in an accessible format upon request.'
From f2e3af4f91a65d3fe88250129cdb96c27ca880d9 Mon Sep 17 00:00:00 2001
From: Joe Galluccio
Date: Thu, 12 Feb 2026 14:43:23 -0500
Subject: [PATCH 09/16] minor text changes
---
.../field.field.media.document.field_accessibility_self_rpt.yml | 2 +-
.../config/field.storage.media.field_accessibility_self_rpt.yml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml b/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
index 8b81a25bb8..a6b68e97cc 100644
--- a/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
+++ b/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
@@ -16,7 +16,7 @@ field_name: field_accessibility_self_rpt
entity_type: media
bundle: document
label: 'Accessibility Status (self-reported)'
-description: 'All Mass.gov documents are required to meet digital accessibility standards. Report if this document is accessible. If you’re unsure how to create, test, or remediate a document to make it accessible, visit the accessibility training resource center. Questions? Sign-up for ACCESS Office Hours.'
+description: 'All Mass.gov documents are required to meet digital accessibility standards. Report if this document is accessible. This will be used for reporting purposes. If you’re unsure how to create, test, or remediate a document to make it accessible, visit the accessibility training resource center. Questions? Sign-up for ACCESS Office Hours.'
required: false
translatable: false
default_value: { }
diff --git a/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml b/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml
index 3a4206a95e..a65fa7a67a 100644
--- a/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml
+++ b/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml
@@ -19,7 +19,7 @@ settings:
label: 'Unverified or not accessible yet:
The document is not accessible or hasn’t been checked for accessibility yet. I understand that my organization needs to replace this document with an accessible version as soon as possible.'
-
value: exception
- label: 'Exception:
I went through the Exception Request Process and this document has been approved as an exception. I understand that my organization must provide this document in an accessible format upon request.'
+ label: 'Exception:
I went through the Exception Request Process (Executive Branch only) and this type of document has been approved as an exception as part of a set of documents. I understand that my organization must provide this document in an accessible format upon request.'
allowed_values_function: ''
module: mass_fields
locked: false
From 6e43cabedf727c817a0b985122a7514c5f36bfe5 Mon Sep 17 00:00:00 2001
From: Dmytro Storozhuk
Date: Fri, 13 Feb 2026 12:51:31 -0600
Subject: [PATCH 10/16] DP-44225: Make accessibility status field required,
remove TBD option
- Set field_accessibility_self_rpt to required: true in config
- Fix widget to safely handle _none option (use isset instead of array_shift)
- Set default_value to NULL when field is required (no empty option)
- Simplify JS reset to just uncheck all radios (no _none to select)
The TBD option was rendered via getEmptyLabel() which only shows when
the field is not required. Making it required eliminates the empty choice.
Existing documents with no value will need authors to select a status
when resaving.
---
...ld.media.document.field_accessibility_self_rpt.yml | 2 +-
.../mass_fields/js/accessibility-status-reset.js | 10 ++--------
...lDocumentSelfReportedAccessibilityStatusWidget.php | 11 +++++++----
3 files changed, 10 insertions(+), 13 deletions(-)
diff --git a/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml b/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
index a6b68e97cc..354ab7eaf0 100644
--- a/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
+++ b/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
@@ -17,7 +17,7 @@ entity_type: media
bundle: document
label: 'Accessibility Status (self-reported)'
description: 'All Mass.gov documents are required to meet digital accessibility standards. Report if this document is accessible. This will be used for reporting purposes. If you’re unsure how to create, test, or remediate a document to make it accessible, visit the accessibility training resource center. Questions? Sign-up for ACCESS Office Hours.'
-required: false
+required: true
translatable: false
default_value: { }
default_value_callback: ''
diff --git a/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js b/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
index 7a3b6e8510..a00ca6ec3a 100644
--- a/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
+++ b/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
@@ -23,14 +23,8 @@
const $form = $fidsField.closest('form');
const $accessibilityRadios = $form.find('input[name="field_accessibility_self_rpt"]');
- // Uncheck all radios.
- $accessibilityRadios.prop('checked', false);
-
- // Check the _none radio button.
- const $noneRadio = $form.find('input[name="field_accessibility_self_rpt"][value="_none"]');
- if ($noneRadio.length) {
- $noneRadio.prop('checked', true).trigger('change');
- }
+ // Uncheck all radios (reset to no selection).
+ $accessibilityRadios.prop('checked', false).trigger('change');
}
}, 100);
});
diff --git a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
index 669e3e6c2d..6480e3b19c 100644
--- a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
+++ b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
@@ -41,13 +41,16 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
$selected = [array_key_first($options)];
}
- // Move "_none" item to the bottom.
- $none = array_shift($options);
- $options['_none'] = $none;
+ // If there's a "_none" option, move it to the bottom.
+ if (isset($options['_none'])) {
+ $none = $options['_none'];
+ unset($options['_none']);
+ $options['_none'] = $none;
+ }
$element['#type'] = 'radios';
$element['#options'] = $options;
- $element['#default_value'] = $selected ? reset($selected) : '_none';
+ $element['#default_value'] = $selected ? reset($selected) : ($this->required ? NULL : '_none');
// Attach JavaScript library to reset accessibility status when file is removed.
$element['#attached']['library'][] = 'mass_fields/accessibility_status_reset';
From c647555cd5951ccff12c1deb879d7e9449239c5c Mon Sep 17 00:00:00 2001
From: Dmytro Storozhuk
Date: Tue, 17 Feb 2026 20:17:12 -0600
Subject: [PATCH 11/16] DP-44225: revert
6e43cabedf727c817a0b985122a7514c5f36bfe5
Signed-off-by: Dmytro Storozhuk
---
.../mass_fields/js/accessibility-status-reset.js | 10 ++++++++--
...lDocumentSelfReportedAccessibilityStatusWidget.php | 11 ++++-------
2 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js b/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
index a00ca6ec3a..7a3b6e8510 100644
--- a/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
+++ b/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
@@ -23,8 +23,14 @@
const $form = $fidsField.closest('form');
const $accessibilityRadios = $form.find('input[name="field_accessibility_self_rpt"]');
- // Uncheck all radios (reset to no selection).
- $accessibilityRadios.prop('checked', false).trigger('change');
+ // Uncheck all radios.
+ $accessibilityRadios.prop('checked', false);
+
+ // Check the _none radio button.
+ const $noneRadio = $form.find('input[name="field_accessibility_self_rpt"][value="_none"]');
+ if ($noneRadio.length) {
+ $noneRadio.prop('checked', true).trigger('change');
+ }
}
}, 100);
});
diff --git a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
index 6480e3b19c..669e3e6c2d 100644
--- a/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
+++ b/docroot/modules/custom/mass_fields/src/Plugin/Field/FieldWidget/ListLongLabelDocumentSelfReportedAccessibilityStatusWidget.php
@@ -41,16 +41,13 @@ public function formElement(FieldItemListInterface $items, $delta, array $elemen
$selected = [array_key_first($options)];
}
- // If there's a "_none" option, move it to the bottom.
- if (isset($options['_none'])) {
- $none = $options['_none'];
- unset($options['_none']);
- $options['_none'] = $none;
- }
+ // Move "_none" item to the bottom.
+ $none = array_shift($options);
+ $options['_none'] = $none;
$element['#type'] = 'radios';
$element['#options'] = $options;
- $element['#default_value'] = $selected ? reset($selected) : ($this->required ? NULL : '_none');
+ $element['#default_value'] = $selected ? reset($selected) : '_none';
// Attach JavaScript library to reset accessibility status when file is removed.
$element['#attached']['library'][] = 'mass_fields/accessibility_status_reset';
From 45f00160e3f32f9b8f6db5a189f8f840184ad686 Mon Sep 17 00:00:00 2001
From: Dmytro Storozhuk
Date: Tue, 17 Feb 2026 20:25:59 -0600
Subject: [PATCH 12/16] DP-44225: Make accessibility status field optional and
enhance JS reset logic
- Set `field_accessibility_self_rpt` to `required: false` in configuration.
- Updated JS to hide and reset the `_none` (TBD) option on file changes.
- Improved reset behavior to handle file uploads, removals, and AJAX updates effectively.
Signed-off-by: Dmytro Storozhuk
---
....document.field_accessibility_self_rpt.yml | 2 +-
.../js/accessibility-status-reset.js | 53 +++++++++++++------
2 files changed, 38 insertions(+), 17 deletions(-)
diff --git a/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml b/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
index 354ab7eaf0..a6b68e97cc 100644
--- a/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
+++ b/conf/drupal/config/field.field.media.document.field_accessibility_self_rpt.yml
@@ -17,7 +17,7 @@ entity_type: media
bundle: document
label: 'Accessibility Status (self-reported)'
description: 'All Mass.gov documents are required to meet digital accessibility standards. Report if this document is accessible. This will be used for reporting purposes. If you’re unsure how to create, test, or remediate a document to make it accessible, visit the accessibility training resource center. Questions? Sign-up for ACCESS Office Hours.'
-required: true
+required: false
translatable: false
default_value: { }
default_value_callback: ''
diff --git a/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js b/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
index 7a3b6e8510..7b2f61cc39 100644
--- a/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
+++ b/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
@@ -1,37 +1,58 @@
/**
* @file
- * Reset the accessibility status field when a document is removed.
+ * Reset the accessibility status field when a document file is removed or replaced.
*/
(function ($, Drupal, once) {
'use strict';
/**
- * Resets the accessibility status radio buttons when file is removed.
+ * Hides the TBD (_none) option and resets to it on file change.
+ *
+ * The _none (TBD) radio is kept in the DOM but hidden. When a file is
+ * uploaded or removed, JS selects the hidden _none radio — effectively
+ * resetting the field to "no selection". The require_on_publish constraint
+ * will then block publishing until the author picks a real option.
*/
Drupal.behaviors.accessibilityStatusReset = {
attach: function (context, settings) {
- // Listen for AJAX commands to detect when a file is removed.
+ const fidsSelector = 'input[data-drupal-selector="edit-field-upload-file-0-fids"]';
+ const noneSelector = 'input[data-drupal-selector="edit-field-accessibility-self-rpt-none"]';
+
+ // Hide the _none (TBD) radio and its wrapper on every attach
+ // (including after AJAX re-renders).
+ $(noneSelector, context).closest('.js-form-item').hide();
+
+ // Track fids to detect file changes.
+ let lastFids = $(fidsSelector).val() || '';
+
$(document).on('ajaxSuccess', function (event, xhr, ajaxSettings) {
- // Small delay to let DOM update after AJAX.
setTimeout(function () {
- // Check if the fids field is empty (file was removed).
- const $fidsField = $('input[data-drupal-selector="edit-field-upload-file-0-fids"]');
+ const $fidsField = $(fidsSelector);
+ if (!$fidsField.length) {
+ return;
+ }
- if ($fidsField.length && !$fidsField.val()) {
- // File was removed, reset accessibility status to _none.
+ const currentFids = $fidsField.val() || '';
+
+ if (currentFids !== lastFids) {
+ lastFids = currentFids;
+
+ // Reset to _none: set both attribute and property so the hidden
+ // radio is checked, and the visible ones are unchecked.
const $form = $fidsField.closest('form');
- const $accessibilityRadios = $form.find('input[name="field_accessibility_self_rpt"]');
+ const $noneRadio = $form.find(noneSelector);
+ const $otherRadios = $form.find('input[name="field_accessibility_self_rpt"]').not(noneSelector);
- // Uncheck all radios.
- $accessibilityRadios.prop('checked', false);
+ // Uncheck visible radios (attribute + property).
+ $otherRadios.removeAttr('checked').prop('checked', false);
- // Check the _none radio button.
- const $noneRadio = $form.find('input[name="field_accessibility_self_rpt"][value="_none"]');
- if ($noneRadio.length) {
- $noneRadio.prop('checked', true).trigger('change');
- }
+ // Check the hidden _none radio.
+ $noneRadio.attr('checked', 'checked').prop('checked', true);
}
+
+ // Re-hide _none after every AJAX update (Drupal may re-render it).
+ $(noneSelector).closest('.js-form-item').hide();
}, 100);
});
}
From a8b7f339a1965d3c7c4f76a647d3a4c745864e5a Mon Sep 17 00:00:00 2001
From: Dmytro Storozhuk
Date: Tue, 17 Feb 2026 20:36:24 -0600
Subject: [PATCH 13/16] DP-44225: Add aria-live announcements to accessibility
status reset
- Inject an aria-live region for screen readers to announce resets.
- Update JavaScript to notify users when the field is reset to an empty state.
- Enhance accessibility and usability for screen reader users.
Signed-off-by: Dmytro Storozhuk
---
.../js/accessibility-status-reset.js | 23 +++++++++++++++----
1 file changed, 18 insertions(+), 5 deletions(-)
diff --git a/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js b/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
index 7b2f61cc39..c11fa3051f 100644
--- a/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
+++ b/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
@@ -11,13 +11,23 @@
*
* The _none (TBD) radio is kept in the DOM but hidden. When a file is
* uploaded or removed, JS selects the hidden _none radio — effectively
- * resetting the field to "no selection". The require_on_publish constraint
- * will then block publishing until the author picks a real option.
+ * resetting the field to the empty state. An aria-live region announces
+ * the reset to screen reader users. The require_on_publish constraint
+ * blocks publishing until the author picks a real option.
*/
Drupal.behaviors.accessibilityStatusReset = {
attach: function (context, settings) {
const fidsSelector = 'input[data-drupal-selector="edit-field-upload-file-0-fids"]';
const noneSelector = 'input[data-drupal-selector="edit-field-accessibility-self-rpt-none"]';
+ const liveRegionId = 'accessibility-status-reset-announcement';
+
+ // Inject an aria-live region once (for screen reader announcements).
+ once('accessibility-status-live-region', 'body').forEach(function (body) {
+ $(body).append(
+ ''
+ );
+ });
// Hide the _none (TBD) radio and its wrapper on every attach
// (including after AJAX re-renders).
@@ -38,8 +48,6 @@
if (currentFids !== lastFids) {
lastFids = currentFids;
- // Reset to _none: set both attribute and property so the hidden
- // radio is checked, and the visible ones are unchecked.
const $form = $fidsField.closest('form');
const $noneRadio = $form.find(noneSelector);
const $otherRadios = $form.find('input[name="field_accessibility_self_rpt"]').not(noneSelector);
@@ -47,8 +55,13 @@
// Uncheck visible radios (attribute + property).
$otherRadios.removeAttr('checked').prop('checked', false);
- // Check the hidden _none radio.
+ // Check the hidden _none radio to reset the field to an empty state.
$noneRadio.attr('checked', 'checked').prop('checked', true);
+
+ // Announce the reset to screen reader users.
+ $('#' + liveRegionId).text(
+ Drupal.t('File accessibility status has been reset. Please make a new selection.')
+ );
}
// Re-hide _none after every AJAX update (Drupal may re-render it).
From 2d703c2ad5b998341b7fd6826d9abd6d5a38c287 Mon Sep 17 00:00:00 2001
From: Joe Galluccio
Date: Wed, 18 Feb 2026 12:40:45 -0500
Subject: [PATCH 14/16] updated views with filter and field in export file
---
.../config/views.view.all_documents.yml | 342 +++++++++++++++++-
.../views.view.all_documents_latest_rev.yml | 313 +++++++++++++++-
2 files changed, 650 insertions(+), 5 deletions(-)
diff --git a/conf/drupal/config/views.view.all_documents.yml b/conf/drupal/config/views.view.all_documents.yml
index 7bab706aa5..766f38060d 100644
--- a/conf/drupal/config/views.view.all_documents.yml
+++ b/conf/drupal/config/views.view.all_documents.yml
@@ -3,6 +3,7 @@ langcode: en
status: true
dependencies:
config:
+ - field.storage.media.field_accessibility_self_rpt
- field.storage.media.field_collections
- field.storage.media.field_document_label
- field.storage.media.field_document_listing_desc
@@ -15,12 +16,13 @@ dependencies:
- taxonomy.vocabulary.label
- workflows.workflow.media_states
module:
+ - better_exposed_filters
- content_moderation
- csv_serialization
- - datetime
- file
- mass_views
- media
+ - options
- rest
- serialization
- taxonomy
@@ -1460,6 +1462,72 @@ display:
title: Unpublished
operator: '='
value: '0'
+ field_accessibility_self_rpt_value:
+ id: field_accessibility_self_rpt_value
+ table: media__field_accessibility_self_rpt
+ field: field_accessibility_self_rpt_value
+ relationship: none
+ group_type: group
+ admin_label: ''
+ plugin_id: string
+ operator: '='
+ value: ''
+ group: 1
+ exposed: true
+ expose:
+ operator_id: field_accessibility_self_rpt_value_op
+ label: 'Accessibility Status (self-reported)'
+ description: ''
+ use_operator: false
+ operator: field_accessibility_self_rpt_value_op
+ operator_limit_selection: false
+ operator_list: { }
+ identifier: field_accessibility_self_rpt_value
+ required: false
+ remember: false
+ multiple: false
+ remember_roles:
+ authenticated: authenticated
+ anonymous: '0'
+ author: '0'
+ editor: '0'
+ emergency_alert_publisher: '0'
+ executive_orders: '0'
+ redirect_creators: '0'
+ content_team: '0'
+ developer: '0'
+ administrator: '0'
+ tester: '0'
+ doc_deletion: '0'
+ d2d_redirect_manager: '0'
+ data_administrator: '0'
+ collection_administrator: '0'
+ prototype_design_access: '0'
+ mmg_editor: '0'
+ viewer: '0'
+ bulk_edit: '0'
+ placeholder: ''
+ autocomplete_filter: 1
+ autocomplete_min_chars: '0'
+ autocomplete_items: '10'
+ autocomplete_field: ''
+ autocomplete_raw_suggestion: 1
+ autocomplete_raw_dropdown: 1
+ autocomplete_dependent: 0
+ autocomplete_contextual: 0
+ autocomplete_autosubmit: 0
+ is_grouped: false
+ group_info:
+ label: ''
+ description: ''
+ identifier: ''
+ optional: true
+ widget: select
+ multiple: false
+ remember: false
+ default_group: All
+ default_group_multiple: { }
+ group_items: { }
filter_groups:
operator: AND
groups:
@@ -4444,6 +4512,68 @@ display:
multi_type: separator
separator: ', '
field_api_classes: false
+ field_accessibility_self_rpt:
+ id: field_accessibility_self_rpt
+ table: media__field_accessibility_self_rpt
+ field: field_accessibility_self_rpt
+ relationship: none
+ group_type: group
+ admin_label: ''
+ plugin_id: field
+ label: 'Accessibility Status (self-reported)'
+ exclude: false
+ alter:
+ alter_text: true
+ text: '{{ field_accessibility_self_rpt__value }}'
+ make_link: false
+ path: ''
+ absolute: false
+ external: false
+ replace_spaces: false
+ path_case: none
+ trim_whitespace: false
+ alt: ''
+ rel: ''
+ link_class: ''
+ prefix: ''
+ suffix: ''
+ target: ''
+ nl2br: false
+ max_length: 0
+ word_boundary: true
+ ellipsis: true
+ more_link: false
+ more_link_text: ''
+ more_link_path: ''
+ strip_tags: false
+ trim: false
+ preserve_tags: ''
+ html: false
+ element_type: ''
+ element_class: ''
+ element_label_type: ''
+ element_label_class: ''
+ element_label_colon: true
+ element_wrapper_type: ''
+ element_wrapper_class: ''
+ element_default_classes: true
+ empty: ''
+ hide_empty: false
+ empty_zero: false
+ hide_alter_empty: true
+ click_sort_column: value
+ type: list_default
+ settings: { }
+ group_column: value
+ group_columns: { }
+ group_rows: true
+ delta_limit: 0
+ delta_offset: 0
+ delta_reversed: false
+ delta_first_last: false
+ multi_type: separator
+ separator: ', '
+ field_api_classes: false
style:
type: data_export
options:
@@ -4497,6 +4627,7 @@ display:
- url
- user.permissions
tags:
+ - 'config:field.storage.media.field_accessibility_self_rpt'
- 'config:field.storage.media.field_collections'
- 'config:field.storage.media.field_document_label'
- 'config:field.storage.media.field_document_listing_desc'
@@ -5120,17 +5251,137 @@ display:
hide_alter_empty: true
destination: false
exposed_form:
- type: input_required_on_request
+ type: bef
options:
submit_button: Filter
- reset_button: 1
+ reset_button: true
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
- expose_sort_order: 1
+ expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
text_input_required: 'Select any filter and click on Apply to see results'
text_input_required_format: basic_html
+ bef:
+ general:
+ autosubmit: false
+ autosubmit_exclude_textfield: false
+ autosubmit_textfield_delay: 500
+ autosubmit_hide: false
+ input_required: true
+ allow_secondary: false
+ secondary_label: 'Advanced options'
+ secondary_open: false
+ reset_button_always_show: false
+ pager:
+ plugin_id: default
+ advanced:
+ is_secondary: false
+ filter:
+ field_title_value:
+ plugin_id: default
+ advanced:
+ placeholder_text: ''
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ filename:
+ plugin_id: default
+ advanced:
+ placeholder_text: ''
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ mid:
+ plugin_id: default
+ advanced:
+ placeholder_text: ''
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ status:
+ plugin_id: default
+ advanced:
+ sort_options: false
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ uid:
+ plugin_id: default
+ advanced:
+ placeholder_text: ''
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ media_org_filter:
+ plugin_id: default
+ advanced:
+ placeholder_text: ''
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ langcode:
+ plugin_id: default
+ advanced:
+ sort_options: false
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ field_document_label_target_id:
+ plugin_id: default
+ advanced:
+ placeholder_text: ''
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ changed:
+ plugin_id: default
+ advanced:
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ field_collections_target_id:
+ plugin_id: default
+ advanced:
+ placeholder_text: ''
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ search:
+ plugin_id: default
+ advanced:
+ sort_options: false
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ field_accessibility_self_rpt_value:
+ plugin_id: default
+ advanced:
+ placeholder_text: ''
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
filters:
bundle:
id: bundle
@@ -5834,6 +6085,89 @@ display:
default_group: All
default_group_multiple: { }
group_items: { }
+ field_accessibility_self_rpt_value:
+ id: field_accessibility_self_rpt_value
+ table: media__field_accessibility_self_rpt
+ field: field_accessibility_self_rpt_value
+ relationship: none
+ group_type: group
+ admin_label: ''
+ plugin_id: string
+ operator: '='
+ value: ''
+ group: 1
+ exposed: true
+ expose:
+ operator_id: field_accessibility_self_rpt_value_op
+ label: 'Accessibility Status (self-reported)'
+ description: ''
+ use_operator: false
+ operator: field_accessibility_self_rpt_value_op
+ operator_limit_selection: false
+ operator_list: { }
+ identifier: field_accessibility_self_rpt_value
+ required: false
+ remember: false
+ multiple: true
+ remember_roles:
+ authenticated: authenticated
+ anonymous: '0'
+ author: '0'
+ editor: '0'
+ emergency_alert_publisher: '0'
+ executive_orders: '0'
+ redirect_creators: '0'
+ content_team: '0'
+ developer: '0'
+ administrator: '0'
+ tester: '0'
+ doc_deletion: '0'
+ d2d_redirect_manager: '0'
+ data_administrator: '0'
+ collection_administrator: '0'
+ prototype_design_access: '0'
+ mmg_editor: '0'
+ viewer: '0'
+ bulk_edit: '0'
+ placeholder: ''
+ autocomplete_filter: 0
+ autocomplete_min_chars: '0'
+ autocomplete_items: '10'
+ autocomplete_field: ''
+ autocomplete_raw_suggestion: 1
+ autocomplete_raw_dropdown: 1
+ autocomplete_dependent: 0
+ autocomplete_contextual: 0
+ autocomplete_autosubmit: 0
+ is_grouped: true
+ group_info:
+ label: 'Accessibility Status (self-reported)'
+ description: ''
+ identifier: field_accessibility_self_rpt_value
+ optional: true
+ widget: select
+ multiple: false
+ remember: false
+ default_group: All
+ default_group_multiple:
+ 1: 1
+ group_items:
+ 1:
+ title: 'Verified accessible'
+ operator: '='
+ value: verified_accessible
+ 2:
+ title: 'Unverified or not accessible yet'
+ operator: '='
+ value: not_tested
+ 3:
+ title: Exception
+ operator: '='
+ value: exception
+ 4:
+ title: blank
+ operator: empty
+ value: ''
filter_groups:
operator: AND
groups:
diff --git a/conf/drupal/config/views.view.all_documents_latest_rev.yml b/conf/drupal/config/views.view.all_documents_latest_rev.yml
index 8c18d630e8..868df89b58 100644
--- a/conf/drupal/config/views.view.all_documents_latest_rev.yml
+++ b/conf/drupal/config/views.view.all_documents_latest_rev.yml
@@ -3,6 +3,7 @@ langcode: en
status: true
dependencies:
config:
+ - field.storage.media.field_accessibility_self_rpt
- field.storage.media.field_category
- field.storage.media.field_collections
- field.storage.media.field_description
@@ -21,6 +22,7 @@ dependencies:
- taxonomy.vocabulary.label
- taxonomy.vocabulary.language
module:
+ - better_exposed_filters
- content_moderation
- csv_serialization
- file
@@ -28,6 +30,7 @@ dependencies:
- media
- media_entity_download
- node
+ - options
- rest
- serialization
- taxonomy
@@ -921,7 +924,7 @@ display:
offset: false
offset_label: Offset
exposed_form:
- type: basic
+ type: bef
options:
submit_button: Apply
reset_button: false
@@ -930,6 +933,169 @@ display:
expose_sort_order: true
sort_asc_label: Asc
sort_desc_label: Desc
+ text_input_required: 'Select any filter and click on Apply to see results'
+ text_input_required_format: basic_html
+ bef:
+ general:
+ autosubmit: false
+ autosubmit_exclude_textfield: false
+ autosubmit_textfield_delay: 500
+ autosubmit_hide: false
+ input_required: true
+ allow_secondary: false
+ secondary_label: 'Advanced options'
+ secondary_open: false
+ reset_button_always_show: false
+ filter:
+ field_title_value:
+ plugin_id: default
+ advanced:
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ mid:
+ plugin_id: default
+ advanced:
+ placeholder_text: ''
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ status:
+ plugin_id: default
+ advanced:
+ sort_options: false
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ moderation_state:
+ plugin_id: default
+ advanced:
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ name:
+ plugin_id: default
+ advanced:
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ node_org_filter:
+ plugin_id: default
+ advanced:
+ placeholder_text: ''
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ node_parent_org_top_filter:
+ plugin_id: default
+ advanced:
+ placeholder_text: ''
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ uid:
+ plugin_id: default
+ advanced:
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ changed:
+ plugin_id: default
+ advanced:
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ search:
+ plugin_id: default
+ advanced:
+ sort_options: false
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ uid_1:
+ plugin_id: default
+ advanced:
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ field_document_label_target_id:
+ plugin_id: default
+ advanced:
+ placeholder_text: ''
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ field_collections_target_id:
+ plugin_id: default
+ advanced:
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ filesize:
+ plugin_id: default
+ advanced:
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ field_language_target_id_1:
+ plugin_id: default
+ advanced:
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ field_category_target_id:
+ plugin_id: default
+ advanced:
+ placeholder_text: ''
+ rewrite:
+ filter_rewrite_values: ''
+ filter_rewrite_values_key: false
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ filemime:
+ plugin_id: default
+ advanced:
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
+ field_accessibility_self_rpt_value:
+ plugin_id: default
+ advanced:
+ placeholder_text: ''
+ collapsible: false
+ collapsible_disable_automatic_open: false
+ is_secondary: false
access:
type: perm
options:
@@ -2122,6 +2288,88 @@ display:
default_group: All
default_group_multiple: { }
group_items: { }
+ field_accessibility_self_rpt_value:
+ id: field_accessibility_self_rpt_value
+ table: media__field_accessibility_self_rpt
+ field: field_accessibility_self_rpt_value
+ relationship: mid
+ group_type: group
+ admin_label: ''
+ plugin_id: string
+ operator: '='
+ value: ''
+ group: 1
+ exposed: true
+ expose:
+ operator_id: field_accessibility_self_rpt_value_op
+ label: 'Accessibility Status (self-reported)'
+ description: ''
+ use_operator: false
+ operator: field_accessibility_self_rpt_value_op
+ operator_limit_selection: false
+ operator_list: { }
+ identifier: field_accessibility_self_rpt_value
+ required: false
+ remember: false
+ multiple: false
+ remember_roles:
+ authenticated: authenticated
+ anonymous: '0'
+ author: '0'
+ editor: '0'
+ emergency_alert_publisher: '0'
+ executive_orders: '0'
+ redirect_creators: '0'
+ content_team: '0'
+ developer: '0'
+ administrator: '0'
+ tester: '0'
+ doc_deletion: '0'
+ d2d_redirect_manager: '0'
+ data_administrator: '0'
+ collection_administrator: '0'
+ prototype_design_access: '0'
+ mmg_editor: '0'
+ viewer: '0'
+ bulk_edit: '0'
+ placeholder: ''
+ autocomplete_filter: 0
+ autocomplete_min_chars: '0'
+ autocomplete_items: '10'
+ autocomplete_field: ''
+ autocomplete_raw_suggestion: 1
+ autocomplete_raw_dropdown: 1
+ autocomplete_dependent: 0
+ autocomplete_contextual: 0
+ autocomplete_autosubmit: 0
+ is_grouped: true
+ group_info:
+ label: 'Accessibility Status (self-reported)'
+ description: ''
+ identifier: field_accessibility_self_rpt_value
+ optional: true
+ widget: select
+ multiple: false
+ remember: false
+ default_group: All
+ default_group_multiple: { }
+ group_items:
+ 1:
+ title: 'Verified accessible'
+ operator: '='
+ value: verified_accessible
+ 2:
+ title: 'Unverified or not accessible yet'
+ operator: '='
+ value: not_tested
+ 3:
+ title: Exception
+ operator: '='
+ value: exception
+ 4:
+ title: blank
+ operator: empty
+ value: ''
filter_groups:
operator: AND
groups:
@@ -4227,6 +4475,68 @@ display:
multi_type: separator
separator: ', '
field_api_classes: false
+ field_accessibility_self_rpt:
+ id: field_accessibility_self_rpt
+ table: media__field_accessibility_self_rpt
+ field: field_accessibility_self_rpt
+ relationship: mid
+ group_type: group
+ admin_label: ''
+ plugin_id: field
+ label: 'Accessibility Status (self-reported)'
+ exclude: false
+ alter:
+ alter_text: true
+ text: '{{ field_accessibility_self_rpt__value }}'
+ make_link: false
+ path: ''
+ absolute: false
+ external: false
+ replace_spaces: false
+ path_case: none
+ trim_whitespace: false
+ alt: ''
+ rel: ''
+ link_class: ''
+ prefix: ''
+ suffix: ''
+ target: ''
+ nl2br: false
+ max_length: 0
+ word_boundary: true
+ ellipsis: true
+ more_link: false
+ more_link_text: ''
+ more_link_path: ''
+ strip_tags: false
+ trim: false
+ preserve_tags: ''
+ html: false
+ element_type: ''
+ element_class: ''
+ element_label_type: ''
+ element_label_class: ''
+ element_label_colon: true
+ element_wrapper_type: ''
+ element_wrapper_class: ''
+ element_default_classes: true
+ empty: ''
+ hide_empty: false
+ empty_zero: false
+ hide_alter_empty: true
+ click_sort_column: value
+ type: list_default
+ settings: { }
+ group_column: value
+ group_columns: { }
+ group_rows: true
+ delta_limit: 0
+ delta_offset: 0
+ delta_reversed: false
+ delta_first_last: false
+ multi_type: separator
+ separator: ', '
+ field_api_classes: false
style:
type: data_export
options:
@@ -4268,6 +4578,7 @@ display:
- url
- user.permissions
tags:
+ - 'config:field.storage.media.field_accessibility_self_rpt'
- 'config:field.storage.media.field_category'
- 'config:field.storage.media.field_collections'
- 'config:field.storage.media.field_description'
From 87b2b23e3a154631991a436230bf8a5cec190e5f Mon Sep 17 00:00:00 2001
From: Dmytro Storozhuk
Date: Wed, 18 Feb 2026 19:19:58 -0600
Subject: [PATCH 15/16] DP-44225: Update JS selector to enhance accessibility
field reset logic
- Extend `noneSelector` to handle multiple naming patterns for `_none` options.
- Ensure compatibility for accessibility status reset in Document media entities.
Signed-off-by: Dmytro Storozhuk
---
.../modules/custom/mass_fields/js/accessibility-status-reset.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js b/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
index c11fa3051f..9825cd52a3 100644
--- a/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
+++ b/docroot/modules/custom/mass_fields/js/accessibility-status-reset.js
@@ -18,7 +18,7 @@
Drupal.behaviors.accessibilityStatusReset = {
attach: function (context, settings) {
const fidsSelector = 'input[data-drupal-selector="edit-field-upload-file-0-fids"]';
- const noneSelector = 'input[data-drupal-selector="edit-field-accessibility-self-rpt-none"]';
+ const noneSelector = 'input[name="field_accessibility_self_rpt"][value="_none"], input[name="media[document][field_accessibility_self_rpt]"][value="_none"]';
const liveRegionId = 'accessibility-status-reset-announcement';
// Inject an aria-live region once (for screen reader announcements).
From 8135e7b5c5368502ff05cf8d4694e1a319dc7e5c Mon Sep 17 00:00:00 2001
From: joeg8612
Date: Thu, 19 Feb 2026 10:10:02 -0500
Subject: [PATCH 16/16] Update
field.storage.media.field_accessibility_self_rpt.yml
---
.../config/field.storage.media.field_accessibility_self_rpt.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml b/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml
index a65fa7a67a..536e0e16f4 100644
--- a/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml
+++ b/conf/drupal/config/field.storage.media.field_accessibility_self_rpt.yml
@@ -19,7 +19,7 @@ settings:
label: 'Unverified or not accessible yet:
The document is not accessible or hasn’t been checked for accessibility yet. I understand that my organization needs to replace this document with an accessible version as soon as possible.'
-
value: exception
- label: 'Exception:
I went through the Exception Request Process (Executive Branch only) and this type of document has been approved as an exception as part of a set of documents. I understand that my organization must provide this document in an accessible format upon request.'
+ label: 'Exception:
I went through the Exception Request Process (Executive Department only) and this type of document has been approved as an exception as part of a set of documents. I understand that my organization must provide this document in an accessible format upon request.'
allowed_values_function: ''
module: mass_fields
locked: false