Rinse the rice under cold water until the water runs clear and drain well.
Heat olive oil in a medium saucepan over medium heat.
Add the chopped onion and sauté until soft and translucent.
Stir in the artichoke hearts and cook for 2–3 minutes.
Add the rice and stir gently to coat with olive oil.
Pour in hot water or vegetable broth, add salt, and bring to a gentle boil.
Reduce heat to low, cover, and cook for 12–15 minutes until the liquid is absorbed.
Remove from heat and let rest for 10 minutes. Fluff with a fork and garnish with dill or parsley before serving.