[Html::namespaceSelector] Remove default id/name attributes
authorKrinkle <krinkle@users.mediawiki.org>
Wed, 7 Mar 2012 19:14:20 +0000 (19:14 +0000)
committerKrinkle <krinkle@users.mediawiki.org>
Wed, 7 Mar 2012 19:14:20 +0000 (19:14 +0000)
commit1e5689852ba4d49e80e24f214cd501164a0b4ebd
tree834a5b2c5c13de81c719d12c081668b92d0511eb
parent1b0a666ed45b9331c269eafca7b8acfc8368d5c1
[Html::namespaceSelector] Remove default id/name attributes
* Remove default id/name attributes
* Remove now redundant tests introduced in r110274
* Add tests to make sure label has no 'for' attribute when label isn't null but name/id are unset
* Update tests to not include id="" and name="" when calling with no arguments
* Updating calls to add name/id if needed, and while at it remove useless 'null' params

* Context:
-- Introduced in r109990, r111376, r111315
-- No callers exist that assume these defaults. Forcing an ID that should be unique is annoying and redundant. The name used in the query when submitting a form should be mentioned in the same file where it is used from the submission, never assume what name="" is from unrelated code
-- Same for ID, this is often used in CSS or JavaScript, shouldn't be assumed. (It should be simple to but two simple namespace selectors on a page without getting DOM conflicts)
includes/Html.php
includes/specials/SpecialContributions.php
includes/specials/SpecialPrefixindex.php
tests/phpunit/includes/HtmlTest.php