Add a @phan-suppress-next-line PhanSuspiciousValueComparison because of
a false positive finding:
includes/InputBox.php:471 PhanSuspiciousValueComparison
Suspicious attempt to compare $this->mType of type 'comment'
to 'comment' of type 'comment' with operator '==='
Change-Id: Id14028d22c1d352a0886a7da0d94b0329a5418df
This is meant to tell the user "please don't do this", "this
combination of parameters is dangerous". But there are other ways
to make links with these parameters. Another patch that changes the
relevant code in EditPage that is responsible for this issue will
follow.
Bug: T297725
Change-Id: I75946e2fc73266802333a77086b7ff6a74f2f3e6
This is a pre-patch for I5144fd6c54 to add a namespace for InputBox and
making sure that this still works, independently of what we're doing
later.
Change-Id: Iaaff18b50619f490a4437be7f4d95845c8e0eedb
Remove the JavaScript module and its logic to toggle the disabled
state on the submit button. Instead, let the browser handle this
natively by setting the `required` attribute, which naturally prevents
early submissions.
Retain the current styling for 99% of cases by using the
:required:invalid selector to target the submit button to make it
appear disabled. This slight duplication of styles is needed because,
despite the form effectively being disabled natively, the core
mediawiki-ui styles only account for :disabled on the button directly
and not e.g. inherited via form:invalid. It is also unclear whether
we would want that, since there is some value to be had from having
the form give a consistent look with a progressive button that can
be submitted even at the wrong time to yield an assistive message to
the required field, so hence handling this locally for now instead of
with a generalised approach.
In order to use the required true/false idiom, I have switched the
generating of the HTML string from the old Xml::element method
to Html::element. This means there is no need to store it in an array
first and conditionally set it since true/false will result in absence
or required="" as needed.
As side-effect from this, redundant attributes like value="" and
type="text" are ommitted from the output, just as MediaWiki core does
more generally.
Bug: T283303
Change-Id: I2c75e09dd3f89fa11fca311b4e1f8133946b01b1
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.PropertyDocumentation.MissingDocumentationPrivate
* MediaWiki.Commenting.PropertyDocumentation.WrongStyle
Additional changes:
* Dropped .inc files from .phpcs.xml (T200956).
* Added the `wikimedia/mediawiki` profile in .eslintrc.json (T262222).
Change-Id: Ic7e903cc97b3766fcff467b382caf2a5a6bc5089
Provide an option to supply the aria-label attribute to the inputbox to
allow generated markup be accessible to screen readers
<inputbox>
type=search
width=120
buttonlabel=Search
arialabel=Search this wiki
</inputbox>
Bug: T242354
Change-Id: I40c62bc9889a4912b43244ec65e628ec8bc8533f
Directly use the UTF-8 encoding of the 'NO-BREAK SPACE' (U+00A0)
instead of the HTML/XML entitiy  .
Bug: T154300
Change-Id: Ica1a16c7114ec2c5bea04b21f14cf083eb4e417b
phan-taint-check gets confused when you escape a variable and
assign the escaped version to the same name as the unescaped
version.
Change-Id: I1bf4d64e68bff516b5f8b6266d85f67020008433