-
Notifications
You must be signed in to change notification settings - Fork 345
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Proposed Code Guide Changes #3060
Comments
I think these are good changes and in general we should be eliminating any thing using Our biggest issue is having a plan to update legacy examples to the new coding practices. |
@jongund Glad to hear that, thank you for the feedback. I was actually suggesting we standardize on |
The ARIA Authoring Practices (APG) Task Force just discussed The full IRC log of that discussion<jugglinmike> Topic: Code guide proposals<jugglinmike> github: https://github.com//issues/3060 <jugglinmike> Matt_King: I would like to get some people with the right engineering background to review and comment on the proposed changes <jugglinmike> Matt_King: I know jongund has already commented <jugglinmike> Matt_King: Our code has two goals. One: to use modern coding practices to keep up-to-date with what people expects, and two: to write in such a way to make the accessibility motivations clear <jugglinmike> OliverH: This reminds me of the coding practices on StackOverflow <jugglinmike> jongund: I'm not so sure about the recommendation to use class fields. I prefer the explicitness of using the "this" keyword, but maybe I'm just set in my way <jugglinmike> OliverH: I think it's about reducing redundancy <jugglinmike> Matt_King: Sometimes, a little redundancy is helpful because it can be taxing to discern the relevant context from the surrounding code <jugglinmike> Matt_King: But then again, I'm not writing JavaScript enough to really weigh in, here <jugglinmike> OliverH: I can research what the recommended way to do this and get back to you next week <jugglinmike> arigilmore: I agree with what's been said in the issue, leaning more toward what OliverH has been saying. I'll keep an eye on the issue and share my perspective as necessary <jugglinmike> Matt_King: Great, then we'll keep this on the agenda for next week |
Thanks for posting the log in here - I'm currently looking into the official best practices. I'll post my updates in here and if you want I'll present them in the meeting next week! |
Here are some of my findings:
Recommendation: ✅ I agree that we should replace / correct snippets of the old style. Using Relevant code guide sections:
Recommendation: ✅ Personally I'd generally recommend using the newer Relevant code guide sections:
Recommendation: ❌ The code guide directly comments on this: Relevant code guide sections:
Recommendation: ✅ The code guide does not contain this topic - but in my opinion it's a good idea to use
Recommendation: I don't really have an opinion on this - I'd like to see some examples first. @outofambit can you share one or two maybe so I can see what exactly you would like to change? PS: I hope this post is to your liking. As I'm still new to the group I tried to make sure to go into as much detail as seemed reasonable, but feel free to critique me 😉 |
The ARIA Authoring Practices (APG) Task Force just discussed The full IRC log of that discussion<jugglinmike> Topic: Code guide updates<jugglinmike> OliverH: I reviewed the code guides that we referenced at our previous meeting <jugglinmike> OliverH: I tried to match the assumptions in the thread with the content in those guides, and I gave recommendations for each <jugglinmike> github: https://github.com//issues/3060 <jugglinmike> Matt_King: I think I would like to move the content of the guide guide out of the wiki because we can't submit pull requests against the wiki <jugglinmike> Matt_King: We do have a place in the APG for information like this <jongund> https://github.com/w3c/aria-practices/wiki/Code-Guide <jugglinmike> Matt_King: If I created a "shell" page for this, would you be willing to draft a patch that relocates the content? <jugglinmike> OliverH: Sure <jugglinmike> OliverH: I'll plan to submit this with one commit that simply relocates the information and a separate commit that proposes changes so that it's easier to understand the modifications we're considering <jugglinmike> Matt_King: That sounds great! |
Hi, here are some thoughts on changes we could make to the code guide to incorporate newer JS features into them. Normally I would open a PR to propose these, but since it is a wiki page, this seemed like the right place to articulate these first.
I read through the code guide and did some perusing through the current set of examples to get a sense of what the general usage and patterns were and would like to propose adding the following to the JavaScript section of the Code Guide:
let
andconst
instead ofvar
for...of
instead offor
loops that don't rely on an index for their logicthis.foo;
withfoo;
in class declarations)const aria = aria || {};
)The text was updated successfully, but these errors were encountered: