Make WordPress Core

Opened 9 months ago

Closed 5 months ago

Last modified 5 months ago

#63391 closed defect (bug) (fixed)

Docs: Typo correction – 'compatability' to 'compatibility'

Reported by: truptikanzariya's profile truptikanzariya Owned by: jonsurrell's profile jonsurrell
Milestone: 6.9 Priority: normal
Severity: trivial Version:
Component: HTML API Keywords: has-patch has-unit-tests
Focuses: docs Cc:

Description

There is a small typo in the following file:

src/wp-includes/html-api/class-wp-html-tag-processor.php

The word "compatability" is misspelled and should be corrected to "compatibility".

Incorrect:
No-quirks mode document compatability mode.
Quirks mode document compatability mode.

Corrected:
No-quirks mode document compatibility mode.
Quirks mode document compatibility mode.

This fix improves accuracy and maintains consistency with the correct spelling used elsewhere.

Attachments (2)

ticket2.patch (2.0 KB) - added by truptikanzariya 9 months ago.
63391.patch (3.3 KB) - added by nareshbheda 9 months ago.
Typo correction: wp-includes/html-api/class-wp-html-doctype-info.php

Download all attachments as: .zip

Change History (27)

This ticket was mentioned in PR #8769 on WordPress/wordpress-develop by @dhruvang21.


9 months ago
#1

#2 @SergeyBiryukov
9 months ago

  • Component changed from General to HTML API
  • Milestone changed from Awaiting Review to 6.9

@abcd95 commented on PR #8769:


9 months ago
#3

@dhruvang21 I think there are a lot more instances where the word compatability is used throughout the codebase.
For instance -

https://github.com/WordPress/wordpress-develop/blob/4dd067fb80096acf764e9732f7cfddc4d433b485/src/wp-includes/html-api/class-wp-html-doctype-info.php#L129-L136

@getsyash commented on PR #8769:


9 months ago
#4

I noticed the typo is also present in variable names like $this->indicated_compatability_mode. I’d like to fix those too, but since it affects functionality, I’ll ensure all references are updated. Please let me know if there are any backward compatibility concerns I should be aware of.

@nareshbheda
9 months ago

Typo correction: wp-includes/html-api/class-wp-html-doctype-info.php

@dhruvang21 commented on PR #8769:


9 months ago
#5

@himanshupathak95 I also noticed that there are additional instances where typos need to be fixed. However, I agree with @getsyash — I think it’s best to wait for input from the reviewers, as they’ll definitely help guide us and suggest the appropriate solutions.

@jonsurrell commented on PR #8769:


6 months ago
#6

Thanks for discovering this! There are a number of typos in comments that can be corrected in the doctype class, those changes would also be welcome.

It's true there's a typo on one public property in that class that's a riskier change. We might leave that for now or open another PR to discuss that on its own. I was surprised to see we don't have @access private on that class like many of the other internal HTML API classes.

#7 follow-up: @dmsnell
6 months ago

Let’s add @access private to the docs — that won’t interfere with any actual running code.

The typo fixes are great: thanks all.

As for the variable I think we should jump at renaming it. We can have others chime in, but it’s early enough and a small-enough portion of the API that I think it’s unlikely to be utilized. There are zero matches on WPDirectory, and apart from a couple of tests (two), there are no references outside of its class.

#8 in reply to: ↑ 7 @sabernhardt
6 months ago

There are zero matches on WPDirectory

WPDirectory is not always current. A GitHub search found some examples.

#9 @dmsnell
6 months ago

Thanks for the link, @sabernhardt — of note, those all appear to be copies/forks of Core (in which case they should be unaffected), or @jonsurrell’s HTML API debugger, which he maintains as part of developing the HTML API.

I think that implies we still have no known references of code calling this accidentally-public property.

#10 @jonsurrell
6 months ago

Let’s add @access private to the docs

I agree, PR 9301 adds this.

As for the variable I think we should jump at renaming it.

I agree.

@jonsurrell commented on PR #8769:


6 months ago
#11

It would be great to fix the rest of the typos in this change, including the property name as discussed on the ticket.

I'll leave this PR until next Tuesday (August 5) to wait for additional changes, after that I'll merge this and start addressing the remaining typos if they haven't been handled.

This ticket was mentioned in PR #9362 on WordPress/wordpress-develop by @naveendwivedi.


6 months ago
#12

Trac ticket:

@naveendwivedi commented on PR #9362:


6 months ago
#13

please merge my PR to trunk- 63391-fix-bug

@dhruvang21 commented on PR #8769:


6 months ago
#14

@sirreal thank's for reviewing the code. i have updated the changes mentioned in the latest commit.

@naveendwivedi commented on PR #9365:


6 months ago
#16

please merge my PR to trunk

@jonsurrell commented on PR #9365:


5 months ago
#17

Hi @naveen-dwivedi-7, thanks for the contribution. This PR duplicates work that was already done in https://github.com/WordPress/wordpress-develop/pull/8769, so I'll close it as a duplicate.

This ticket was mentioned in Slack in #core-committers by jonsurrell. View the logs.


5 months ago

#19 @jonsurrell
5 months ago

  • Owner set to jonsurrell
  • Severity changed from normal to trivial
  • Status changed from new to assigned

@jonsurrell commented on PR #9365:


5 months ago
#20

There is still some remaining work do be done on the ticket that hasn't been handled, specifically the property typo fix mentioned here. That would be a great place to get involved.

#21 @jonsurrell
5 months ago

In 60540:

Docs: Fix typos in HTML API documentation.

Corrects misspelling "compatability" to "compatibility."

Developed in https://github.com/WordPress/wordpress-develop/pull/8769.

Props dhruvang21, jonsurrell, abcd95, getsyash, truptikanzariya, nareshbheda, sergeybiryukov, dmsnell, sabernhardt.
See #63391.

@jonsurrell commented on PR #8769:


5 months ago
#22

Merged in [60540]. Thanks!

This ticket was mentioned in PR #9401 on WordPress/wordpress-develop by @jonsurrell.


5 months ago
#23

  • Keywords has-unit-tests added

Fix typo in the indicated_compatibility_mode property of WP_HTML_Doctype_Info as discussed on the ticket.

Trac ticket: https://core.trac.wordpress.org/ticket/63391

#24 @jonsurrell
5 months ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 60647:

HTML API: Fix typo in indicated_compatibility_mode.

Developed in https://github.com/WordPress/wordpress-develop/pull/9401.

Follow-up to [60540].

Props jonsurrell, dmsnell.
Fixes #63391.

@jonsurrell commented on PR #9401:


5 months ago
#25

Merged in [60647].

Note: See TracTickets for help on using tickets.