Skip to content

Commit

Permalink
Merge branch 'master' into VAGOV-0000-update-va-web
Browse files Browse the repository at this point in the history
  • Loading branch information
swirtSJW authored Feb 6, 2020
2 parents 549f93d + 975c392 commit da4b7bf
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 10 deletions.
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE/cms-bug-report.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
name: Bug report
name: Defect report
about: Create a report to help us improve
title: "[CMS bug] "
labels: bug
title: "<Defect summary>"
labels: Defect
assignees:
---
**Describe the bug**
**Describe the defect**
A clear and concise description of what the bug is.

**To Reproduce**
Expand All @@ -21,7 +21,7 @@ A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
**Desktop (please complete the following information if relevant, or delete):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Expand All @@ -31,7 +31,7 @@ Add any other context about the problem here.


## Labels
- [/] Issue type (red) (defaults to bug)
- [/] Issue type (red) (defaults to "Defect")
- [ ] CMS subsystem (green)
- [ ] CMS practice area (blue)
- [/] CMS objective (orange) (not needed for bug tickets)
Expand Down
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,8 @@
"Bypass password requirement for password change if logged in with sso.": "https://www.drupal.org/files/issues/2018-05-01/simplesamlphp_auth-change-password-access-2968598-2.patch"
},
"drupal/tablefield": {
"0 string value in cell throws empty error": "https://www.drupal.org/files/issues/2019-12-10/0-value-throwing-empty-error.patch"
"0 string value in cell throws empty error": "https://www.drupal.org/files/issues/2019-12-10/0-value-throwing-empty-error.patch",
"Make tables draggable": "https://www.drupal.org/files/issues/2019-04-25/tablefield-tabledrag_support-3040358-4-D8.patch"
},
"drupal/textfield_counter": {
"Prevent form submission when character limit exceeded option does not work": "https://www.drupal.org/files/issues/2018-10-04/textfield_counter-prevent_form_submission_does_not_work-3004457-2.patch"
Expand Down
4 changes: 4 additions & 0 deletions docroot/modules/custom/va_gov_backend/va_gov_backend.module
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,10 @@ function va_gov_backend_menu_local_tasks_alter(&$local_tasks) {
$local_tasks['tabs'][0]['entity.node.canonical']['#link']['title'] = 'View';
$local_tasks['tabs'][0]['entity.node.canonical']['#link']['url'] = Url::fromUri('internal:/node/' . $nid);
}
// Remove the history tab.
if (!empty($local_tasks['tabs'][0]['views_view:view.moderation_history.page'])) {
unset($local_tasks['tabs'][0]['views_view:view.moderation_history.page']);
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,17 @@ function va_gov_build_trigger_preprocess_page(&$variables) {
// It's a node.
$path = \Drupal::request()->getpathInfo();
$arg = explode('/', $path);

// Make sure we aren't on the node form.
if (empty($arg[1]) || empty($arg[2]) || $arg[1] !== 'node' && !is_numeric($arg[2])) {
$exclusion_types = [
'outreach_asset',
'person_profile',
'support_service',
'regional_health_care_service_des',
'health_care_local_health_service',
];
// Make sure we aren't on the node form or an excluded type.
$route_name = \Drupal::routeMatch()->getRouteName();
if (($route_name !== 'entity.node.edit_form') &&
(!in_array($node->bundle(), $exclusion_types))) {
// Make sure we aren't on /training-guide.
$current_uri = \Drupal::request()->getRequestUri();
if ($current_uri !== '/training-guide') {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{#
/**
* @file
* Theme override for a fieldset element and its children.
*
* Available variables:
* - attributes: HTML attributes for the fieldset element.
* - errors: (optional) Any errors for this fieldset element, may not be set.
* - required: Boolean indicating whether the fieldeset element is required.
* - legend: The legend element containing the following properties:
* - title: Title of the fieldset, intended for use as the text of the legend.
* - attributes: HTML attributes to apply to the legend.
* - description: The description element containing the following properties:
* - content: The description content of the fieldset.
* - attributes: HTML attributes to apply to the description container.
* - children: The rendered child elements of the fieldset.
* - prefix: The content to add before the fieldset children.
* - suffix: The content to add after the fieldset children.
*
* @see template_preprocess_fieldset()
*/
#}
{%
set classes = [
'js-form-item',
'form-item',
'js-form-wrapper',
'form-wrapper',
]
%}
<fieldset{{attributes.addClass(classes)}}>
{%
set legend_span_classes = [
'fieldset-legend',
required ? 'js-form-required',
required ? 'form-required',
]
%}
{# Always wrap fieldset legends in a <span> for CSS positioning. #}
<legend{{legend.attributes}}>
<span{{legend_span.attributes.addClass(legend_span_classes)}}>{{ legend.title }}</span>
</legend>
{% if description.content %}
<div{{description.attributes.addClass('description')}}>{{ description.content }}</div>
{% endif %}

<div class="fieldset-wrapper">
{% if errors %}
<div class="form-item--error-message">
<strong>{{ errors }}</strong>
</div>
{% endif %}
{% if prefix %}
<span class="field-prefix">{{ prefix }}</span>
{% endif %}
{{ children }}
{% if suffix %}
<span class="field-suffix">{{ suffix }}</span>
{% endif %}

</div>
</fieldset>

1 comment on commit da4b7bf

@va-cms-bot
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Test Failed: va/tests/accessibility
composer va:test:accessibility
> phantomjs-prebuilt@2.1.16 install /var/aegir/projects/cms/pr888/node_modules/phantomjs-prebuilt
> node install.js

PhantomJS not found on PATH
Download already available at /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2
Verified checksum of previously downloaded file
Extracting tar contents (via spawned process)
Removing /var/aegir/projects/cms/pr888/node_modules/phantomjs-prebuilt/lib/phantom
Copying extracted folder /tmp/phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2-extract-1581014993921/phantomjs-2.1.1-linux-x86_64 -> /var/aegir/projects/cms/pr888/node_modules/phantomjs-prebuilt/lib/phantom
Writing location.js file
Done. Phantomjs binary available at /var/aegir/projects/cms/pr888/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs

> core-js@2.6.9 postinstall /var/aegir/projects/cms/pr888/node_modules/core-js
> node scripts/postinstall || echo "ignore"

Thank you for using core-js ( https://github.com/zloirock/core-js ) for polyfilling JavaScript standard library!

The project needs your help! Please consider supporting of core-js on Open Collective or Patreon: 
> https://opencollective.com/core-js 
> https://www.patreon.com/zloirock 

Also, the author of core-js ( https://github.com/zloirock ) is looking for a good job -)

added 134 packages from 190 contributors and audited 183 packages in 4.571s
found 2 low severity vulnerabilities
  run `npm audit fix` to fix them, or `npm audit` for details

> axe_tests@1.0.0 test /var/aegir/projects/cms/pr888
> node ./tests/accessibility/aXeAccessibilityCheck.js

!!!  NUMBER OF NEW VIOLATIONS on http://pr888.ci.cms.va.gov 1
!!!  NUMBER OF NEW VIOLATIONS on http://pr888.ci.cms.va.gov/sections  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://pr888.ci.cms.va.gov/node/add/page  = 1
[ { id: 'duplicate-id',
    impact: 'minor',
    tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ],
    description: 'Ensures every id attribute value is unique',
    help: 'id attribute value must be unique',
    helpUrl:
     'https://dequeuniversity.com/rules/axe/3.3/duplicate-id?application=webdriverjs',
    nodes: [ [Object], [Object] ] } ]
!!!  NUMBER OF NEW VIOLATIONS on http://pr888.ci.cms.va.gov/node/add/landing_page  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://pr888.ci.cms.va.gov/node/add/documentation_page  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://pr888.ci.cms.va.gov/node/add/event  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://pr888.ci.cms.va.gov/node/add/health_care_local_facility  = 1
[ { id: 'label',
    impact: 'critical',
    tags:
     [ 'cat.forms',
       'wcag2a',
       'wcag332',
       'wcag131',
       'section508',
       'section508.22.n' ],
    description: 'Ensures every form element has a label',
    help: 'Form elements must have labels',
    helpUrl:
     'https://dequeuniversity.com/rules/axe/3.3/label?application=webdriverjs',
    nodes:
     [ [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object],
       [Object] ] } ]
!!!  NUMBER OF NEW VIOLATIONS on http://pr888.ci.cms.va.gov/node/add/health_care_region_detail_page  = 1
[ { id: 'duplicate-id',
    impact: 'minor',
    tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ],
    description: 'Ensures every id attribute value is unique',
    help: 'id attribute value must be unique',
    helpUrl:
     'https://dequeuniversity.com/rules/axe/3.3/duplicate-id?application=webdriverjs',
    nodes: [ [Object], [Object] ] } ]
!!!  NUMBER OF NEW VIOLATIONS on http://pr888.ci.cms.va.gov/node/add/health_care_region_page  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://pr888.ci.cms.va.gov/node/add/office  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://pr888.ci.cms.va.gov/node/add/outreach_asset  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://pr888.ci.cms.va.gov/node/add/person_profile  = 1
[ { id: 'duplicate-id-aria',
    impact: 'critical',
    tags: [ 'cat.parsing', 'wcag2a', 'wcag411' ],
    description:
     'Ensures every id attribute value used in ARIA and in labels is unique',
    help: 'IDs used in ARIA and labels must be unique',
    helpUrl:
     'https://dequeuniversity.com/rules/axe/3.3/duplicate-id-aria?application=webdriverjs',
    nodes: [ [Object] ] } ]
!!!  NUMBER OF NEW VIOLATIONS on http://pr888.ci.cms.va.gov/node/add/press_release  = 1
[ { id: 'aria-allowed-attr',
    impact: 'critical',
    tags: [ 'cat.aria', 'wcag2a', 'wcag412' ],
    description: 'Ensures ARIA attributes are allowed for an element\'s role',
    help: 'Elements must only use allowed ARIA attributes',
    helpUrl:
     'https://dequeuniversity.com/rules/axe/3.3/aria-allowed-attr?application=webdriverjs',
    nodes: [ [Object] ] } ]
!!!  NUMBER OF NEW VIOLATIONS on http://pr888.ci.cms.va.gov/node/add/regional_health_care_service_des  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://pr888.ci.cms.va.gov/node/add/news_story  = 0
[]
!!!  NUMBER OF NEW VIOLATIONS on http://pr888.ci.cms.va.gov/node/add/support_service  = 0
[]
!!!  VIOLATION TYPES FOUND: 6 PROCESS EXITED WITH CODE 1  !!!
> npm install --only=production
> npm test
Thu, 06 Feb 2020 18:49:58 GMT axe-webdriverjs deprecated Error must be handled as the first argument of axe.analyze. See: #83 at tests/accessibility/aXeAccessibilityCheck.js:44:14
Thu, 06 Feb 2020 18:50:00 GMT axe-webdriverjs deprecated Error must be handled as the first argument of axe.analyze. See: #83 at tests/accessibility/aXeAccessibilityCheck.js:56:42
Failed to inject axe-core into one of the iframes!
Failed to inject axe-core into one of the iframes!
npm ERR! Test failed.  See above for more details.
Script npm test handling the va:test:accessibility event returned with error code 1
  • On: devshop.cms.va.gov
  • In: 01:18

Please sign in to comment.