aria-label vs aria-labelledby vs aria-describedby

aria-label

  • This provides a recognizable name for the object to the user.
  • If the label text is visible on screen, authors SHOULD use aria-labelledby and SHOULD NOT use aria-label. Use aria-label only if the interface is such that it is not possible to have a visible label on the screen.
  • The aria-label is used to add an accessible name directly to an element.

Read More

Jest basic

Setup Jest: Getting started Jest with Typescript

toBe() vs toEqual()

toBe compares strict equality, using ===.
toEqual compares the values of two variables. If it’s an object or array, it checks the equality of all the properties or elements.

Run only the test group

1
2
3
4
5
describe.only("addition test", () => {
it("add 1 + 1 to be 2", () => {
expect(1 + 1).toBe(2);
});
});

Read More

How to write draft post in Hexo

  1. Create a new draft post
    hexo new draft "Hexo how to write draft post"

  2. Preview draft on your local server
    hexo server --draft

  3. Publish the draft post
    hexo publish "Hexo how to write draft post"

Read More

Git commit user setting

Change(or add) name and email in config file to change the commit user.

/.git/config

1
2
3
[user]
name = XXXXXXXXX
email = xxxxxxxx@mail.hoe

Read More