Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-15717

.globalsearch uses a submit button instead of input[@type='submit']

    XMLWordPrintable

Details

    • Unknown
    • N/A
    • N/A
    • 4.1.2 Name, Role, Value

    Description

      AFFECTS:

      • All pages
      • xwiki:XWiki.WatchListRss
      • xwiki:Main.WebHome
      • etc.

      ERROR:

      • org.xwiki.test.webstandards.CustomDutchWebGuidelinesValidationTest.Validating HTML5 Dutch Web Guidelines validity for: xwiki:XWiki.WatchListRss executed with credentials Admin:admin (from org.xwiki.test.webstandards.AllTests)
      • ERROR: At least one form does not have a <submit> button.

      INVALIDATES:

      EXPLANATION:

      • The code is looking for //input[@type='submit'] or //input[@type='image']
      • The current .globalsearch is using <button type="submit" class="btn" title="Search">

      FIXES:

      • VAR1: Replace the usage of button[@type='submit'] with an input in the template
      • VAR2: Add the button@type='submit' use case in the test's function validateRpd13s4() since the usage is valid. You can read here more about the usage difference https://css-tricks.com/use-button-element/ . Short version: the button element can be more easily styled with CSS, which is our case with our Search button.

      Attachments

        Issue Links

          Activity

            People

              mflorea Marius Dumitru Florea
              evalica Ecaterina Moraru (Valica)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: