Problem/Motivation

There is an error with invalid form submissions. On Chrome 71.0.3578.98 on Mac OSX 10.14.2, Safari 12.0.2 and Opera 58.0.3135.47 there is no red outline around the slider range when an invalid range is selected, this appears on Firefox 64.0.2 on Mac OSX 10.14.2. The theme is the default Bartik theme using Drupal 8.7.0-dev. The module inline form errors was installed and the latest patch to fix issues with forms applied.

This issue is scoped to Bartik and Seven. See #7. Work for Claro is in #3033852: Redesign range input.

Steps to reproduce

TBA

Proposed resolution

TBA

Remaining tasks

Update patch
Review
Commit

User interface changes

TBA

API changes

Data model changes

N/A

Release notes snippet

Comments

Suesdesign created an issue. See original summary.

Suesdesign’s picture

I have added the following CSS style to Classy and it has resolved the issue.

.form-item input.form-range.error {
  outline: 2px solid red;
}
dinesh_kesarkar’s picture

Hi,

May I know which module you used for range apart from the inline form errors to reproduce this issue? or let me know the steps to replicate this issue.

Thanks, Dinesh

andrewmacpherson’s picture

@dinesh_kesarkar - Drupal core provides a Form API range element, but it isn't used in Drupal core modules. For testing inline form errors, we have been using the Error Style module (hosted on GitHub).

When enabled, you can visit /error-style/form to see an example form with all the core form fields. When submitted, every field is marked with an error. It works with or without the Inline Form Errors module.

andrewmacpherson’s picture

@Suesdesign - thanks for your first Drupal bug report!

dinesh_kesarkar’s picture

StatusFileSize
new2.17 KB
new2.4 KB

@andrewmacpherson - thank you for this clarification in details. I tried that module at my local & I am able to reproduce the red outline error.

When I tried @Suesdesign's #2 code in classy then I noticed that, red outline is getting applied to the range field in firefox & chrome as well (see in attachment).

What is the expected result here ? the red outline should be demolished in firefox or it should get displayed in all search engines?

Thanks, Dinesh

andrewmacpherson’s picture

@dinesh_kesarkar - thanks fir trying to replicate this.

I've realized there's one more thing for the steps to reproduce - @Suesdesign mentions....

The module inline form errors was installed and the latest patch to fix issues with forms applied.

That refers to the patch being worked on for #2848507: Indicate that grouping elements have child element errors for ux and a11y - we were testing that patch in all browsers, during the Global Contribution Weekend. That issue is actually about the the appearance of the vertical tabs and details, and the range slider is just something we noticed along the way. I asked @Suesdesign to grab screenshots and file an issue, so we could address it later.

Your screenshots were presumably made without the patch from #2848507: Indicate that grouping elements have child element errors for ux and a11y, because we forgot to mention it :-)
But that's super usefull, because it tells us that before that patch, Chrome and Firefox had a red box outline, and after it only Firefox had the red outline.

I don't really know what the expected result is. I think it might be fair to say that we neglected to design an error style for the range slider? Range exists as a Form API element, but it isn't mentioned on the Seven theme style guide. Since range isn't actually used in core modules (just in some test modules) it escaped our notice until now.

I'll mention it at the other issue, but hopefully we can address range errors in this separate issue.

dinesh_kesarkar’s picture

StatusFileSize
new42.82 KB
new27.39 KB

Hi @Suesdesign @andrewmacpherson,

Just now I installed latest drupal version on my local that is 8.6.9 & I observed that, there is no red outline error around the range field though its having border to the .form-iteminput.error class in both search engine. I am trying to reproduce it on windows 10 with Chrome 72.0.3626.109 & Firefox 65.0.1 (64-bit) & this without #2848507: Indicate that grouping elements have child element errors for ux and a11y patch. Please see the attachments.

Thanks, Dinesh

andrewmacpherson’s picture

Title: No red outline around invalid slider range » Range FAPI element has inconsistent style between browsers, including error state.
Issue tags: +accessibility

Updating the title, because we've learned that the range element didn't have an intended design in the first place.
In the screenshots we have so far, we also see a variety of different range slider handle styles.

Maybe this issue can be about devising a style for range elements in Seven/Bartik, or at least some level of consistency for the error styles.

As far as WCAG goes, this isn't an outright accessibility failure. In the WCAG 3.3 Input Assistance guideline group, we have implemented the following "sufficient techniques" (WCAG terminology):

  • G83: Providing text descriptions to identify required fields that were not completed
  • G84: Providing a text description when the user provides information that is not in the list of allowed values
  • ARIA2: Identifying a required field with the aria-required property
andrewmacpherson’s picture

Issue tags: -accessibility +Accessibility
Related issues: +#3033852: Redesign range input

Filed an issue to include a design for the range input in the next D8 dmin theme (Claro).
This issue can be scoped to Seven and Bartik.

dinesh_kesarkar’s picture

Hi @Suesdesign @andrewmacpherson,

I have created couple of patches which has two situation, if you look at adding outline patch where I have changed some css which gives output as expected that means adding error outline around range field but also added same to the radio buttons & checkbox as shown in screenshots. If this is acceptable then we can apply this patch to the core.

In another patch, I have removed those outlines from the radio buttons & checkbox which also can get apply to the core as shown in screenshot.

Please have a look on those two patches & don't hesitate to correct me if any.

I am using windows 10.

Thanks, Dinesh

dinesh_kesarkar’s picture

Status: Active » Needs review
Issue tags: -Accessibility +accessibility
tim.plunkett’s picture

Issue tags: -ContributionWeekend2019, -accessibility (duplicate tag) +Accessibility

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Issue summary: View changes
Issue tags: +Bug Smash Initiative, +Needs reroll

I have added the issue template and added a few items to the issue summary. I have not done a complete update of the Issue Summary.

The patch no longer applies, so adding tag for re-roll. And this will need screenshots in the issue summary as well.

mahima_mathur23’s picture

Both patches of #11 against version 9.5x

The last submitted patch, 22: [addingoutline]-[3028647]-[22].patch, failed testing. View results

Status: Needs review » Needs work
immaculatexavier’s picture

Status: Needs work » Needs review
StatusFileSize
new1.07 KB

Rerolled patch against #24

Status: Needs review » Needs work

The last submitted patch, 26: 3028647-26.patch, failed testing. View results

druprad’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new1.09 KB

Rerolled patch against #11 for drupal 9.4.4

Munavijayalakshmi’s picture

StatusFileSize
new1.1 KB

Re-rolled patch.

Status: Needs review » Needs work

The last submitted patch, 29: 3028647-29.patch, failed testing. View results

druprad’s picture

StatusFileSize
new1.09 KB

Fix issue in patch 28
Rerolled patch against #11 for drupal 9.4.4

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

mgifford’s picture

Ok, so @andrewmacpherson you don't think we can assign this with a WCAG SC 3.3.1 or 3.3.3 failure.

ameymudras’s picture

Version: 10.1.x-dev » 9.5.x-dev
Status: Needs work » Needs review
StatusFileSize
new1.97 KB
new740 bytes

Changing the version to D9 since the patch targets themes which are removed in D10 and there is a separate ticket for the same.

I have updated the patch to update form hash

Status: Needs review » Needs work

The last submitted patch, 34: 3028647-34.patch, failed testing. View results

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.